/blog (subdomain) 404 errors in webmaster tools /default.htm - wordpress

I am new to Stackoverflow but a friend gave me a tip to ask my question over here since he couldn't help me as well. I have google's for multiple days now and I see that my rankings are dropping again in google because of all the crawl errors. My main site is build in serif webplus X5. I have added a wordpress blog to it which can be found at www.sitename .com/blog
Google has found more than 150 crawling errors and this is growing on a daily base, the point is that google ads behind all my blog url's /default.htm
I was wondering if someone can write me a htaccess 301 code for all these url's so it will instant redirect?
Today I started with manually redirecting some url's but this will not solve my problem because everytime I add another post and new tags all these new page's will also have the same default issue.
As you can imagine this is really frustrating grrr...
I have tried a lot of code's that I had found during my search but none of them did what I would like to achieve, other tips to get rid of the default page's are also very welcome.
Thank all of you who would like to fix this problem with me

Place this rule just below RewriteEngine On rule in main WP .htaccess:
RewriteCond %{THE_REQUEST} /default\.htm [NC]
RewriteRule ^(.*?)default\.htm$ /blog/$1 [L,R=301,NC,NE]

Related

Wordpress Site block Joomla URLs using hatches

I have a wordpress site on SiteGround and have hundreds of attempts entering looking for http://example.com/?option=com_k2&view=itemlist&task=user&id=93265
The old site used Joomla and it appears that bots still have the site on their list.
Please let me know if there is a way to prevent these requests from causing an "execution" of index.php as this has a 20,000 execution daily limit on Siteground shared host. Passing the limit causes the site to be disabled.
Thanks in advance for any suggestions.
Found this on http://botcrawl.com/how-to-block-incoming-traffic-backlinks-attempted-site-hijacks-and-multiple-urls-in-the-htaccess-file/
RewriteCond %{QUERY_STRING} option=com_k2
RewriteRule ^ - [F]
It appears to working. I'll write back if not.

Removing index.htm from URL

I have a WordPress blog which is functioning just fine - the URLs are set to Month/Day/Year and everything on the front-end looks and functions fine.
However, when checking my stats and Google Webmaster Tools, there's tons of 404s that look like this:
http://theURL.com/normal-wordpress-url/index.htm
Of course, index.htm does not exist at the end of the WordPress URL, so the search engine is given a 404.
I have no idea what's causing this, as everything works fine for humans.
So basically, I need a way to tell search engines to forget about the index.htm at the end of the URL.
I've tried this in the .htacess with no luck:
RewriteCond %{REQUEST_URI} /index\.htm?$ [NC]
RewriteRule ^(.*)index\.htm?$ "/$1" [NC,R=301,NE,L]
Does anybody have any suggestions?
Maybe there are different problems in here that may need solution:
Problem 1: If the crawler is the one pointing to this page there are two things that you might need to do:
Try to go to Webmaster and delete "index.htm"
Try to create a robot that will disallow "index.htm" from being seen on Google Crawler.
Problem 2: If you have distributed your urls to point to this url, Google Webmaster can tell you which webpage it is coming from exactly.
So, try to make sure that all the links pointing to "index.htm" are removed from all other urls.

Wordpress page numbers and .htaccess ModRewrite rule

we're getting quite a few errors popping up in webmaster tools. Our homepage paginated pages are showing up without the page prefix i.e. 17/ instead of page/17/
Can anyone help me write a rule to redirect these pages so the errors don't keep popping up?
We need to turn…
http://wwwexample.com/17/
into…
http://wwwexample.com/page/17/
We only need this to work for the homepage though as the pagination is working fine for the rest of the site i.e.
www.example.com/category/snails/17/ (This is working properly)
I'm not hot on mod rewrite and would like to start learning more about it.
Thanks,
James
Add these rules before your wordpress rules in your htaccess file in your document root:
RewriteRule ^([0-9]+)/$ /page/$1/ [R=301,L]

Trying to visit URL without www. causes WordPress to try and load the non-existent /defaultsite page

If I try to navigate to http://vequityintelligence.co.uk then WordPress redirects the browser (301 Moved Permanently) to http://www.vequityintelligence.co.uk/defaultsite which doesn't exist, so I get a 404 Not Found error.
The htaccess file is the one that came with WordPress.
I've refreshed my permalinks by changing the permalink format.
The site frontpage is set to the 'Recent Posts' option, but changing this doesn't affect it.
I understand why I get redirected, but I don't understand where the addition of '/defaultsite' comes from.
I have searched google and SO with very few results, let alone any answers. I can't think what else might cause this.
I imagine you don't need this answer anymore, but adding it for posterity: weird as it sounds, I think it's a caching issue.
I just came across this with a client's site I'm working on, and was at my wit's end, but then found some references that said it worked okay in one browser but not another, and clearing the cache fixed it.
An easy test: if you visit the URL in a browser you've never used to visit it, do you still have the issue? If not, it's probably just a matter of clearing the cache in the browser that is giving you trouble.
In the Wordpress dashboard > General Settings, check your setting for the Wordpress Address (URL) and Site Address (URL).
This is where I made sure the ‘www.’ was unnecessary for my URL.
I'd say it's a problem with the htaccess file. Perhaps adding the following code to htaccess will resolve the problem.
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
This redirects non-www to www. Put this near the top so it is processed before other rules are.
Code found here

.htacces - moving all posts in root to a new category

Could anyone please help me? I am at the last chance saloon and losing a lot of traffic. Any help would be greatfully received.
After a year based on my permalink structure, all posts were in the root so have been picked up by Google as:
snowmenu.com/postname
Since changing my categories and permalink structure, I need the years worth of posts on Google to be redirected to:
snowmenu.com/ski-snowboard-winter-sports-news/postname
Is there a way to make this happen via .htaccess?
Thank you very much to anyone who's able to help me.
Just had a look at the website and I am afraid from my knowledge their is no easy way to do this type of forwarding with .htaccess.
This is because there is no way to tell the difference in link structure from a "normal link" like (eg http://www.snowmenu.com/ski-resorts/) and what you want to be redirected to (eg http://www.snowmenu.com/ski-snowboard-winter-sports-news/latest-ski-news/). If you redirect all requests you will end up having links like http://www.snowmenu.com/ski-snowboard-winter-sports-news/ski-resorts/ which if I am right is not desirable?
The long solution would be to create a htaccess redirect for EVERY URL.
The only other solution that comes to mind is using PHP (or simular) to do a redirect within your 404 document.
EDIT
This will redirect ALL requests to the page you want. But as I said before I dont think this is what you want?
RewriteRule ^(?!ski-snowboard-winter-sports-news)(.*)$ /ski-snowboard-winter-sports-news/$1 [L,R=301]
EDIT 2
Having given it some thought I think I have have come up with a viable option. This will check to see if the requested file exists, if so it will redirect to your new directory (in theory :P).
RewriteCond %{DOCUMENT_ROOT}/ski-snowboard-winter-sports-news/$0 -f
RewriteRule ^(.*)$ /ski-snowboard-winter-sports-news/$1 [R=301,L]
You can use this plugin to avoid messing with .htaccess file directly:
http://wordpress.org/extend/plugins/redirection/
It has a nice interface for you to configure the redirection rules.
The plugin mentioned by #Wordpress Hardcore works best.

Resources