I work with WordPress everyday designing optimizing and maintaining sites for a whole range of different clients and types of businesses. One of the issues that come up frequently with our clients is the, “Help! I have thousands of 404 Errors listed in Webmaster Tools Crawler Error,” also known as the “WordPress 404 Error, “after I started fooling around with the site's Permalink structure,” email.
Crawler Errors In Web Master Tools
Crawl errors is one of the most popular features in Webmaster Tools, and there are several common reasons you may be seeing these errors, but nine times out of ten 404 errors with WordPress are due to permalink structure changes.So, What The Heck Is My Permalink?
A permalink is the link to an individual blog post. By default WordPress uses web URLs which have question marks and lots of numbers in them. And that puts us at a disadvantage in terms of clickthrough rates because users are far more likely to click on a url that they can easily read vs. one that just has a bunch of numbers that really don’t mean anything. However, WordPress offers you the ability to create a custom URL structure for your permalinks and archives. This can improve your clickthrough rate as well as the aesthetics, usability, and forward-compatibility of your links.
Ok, But What’s Going To Happen To All My Old Urls?
This is one of those questions that often get asked after the fact. Typically, it goes a little something like this. Someone mentions something about changing permalinks and seo and naturally you get a little curious. You do a computer search. You come across a blog where you find some well-meaning yet misguided little piece of information. Boom! The next thing you know, you have thousands of 404 Error pages.After working with WordPress for nearly a decade, I can honestly say, “been there, done that.” And so I wanted to write this guide because hopefully it will help some of you who may be looking to change or may have already changed your permalink structure and maybe seeing thousands of 404 Error pages.
Understanding 404 Errors Pages
404s are a perfectly normal part of the web. The Internet is always changing, new content is born, old content dies, and when it dies it (ideally) returns a ‘404 HTTP’ response code. Search engines are aware of this and I have errors on my own site.The ONLY time this is a problem is when the search engine attempts to visit a page that doesn’t appear to exist - either because you changed the permalink structure, categorization of the post, renamed it without redirecting the old URL to a new page, or because of a typo in a link. In either one of these scenarios, you're probably leaking PR.
So, generally speaking, anytime we change our WordPress permalink structure, we should 301 redirect the old URL to the new URL. That way when users come to the old URL looking for that content, they’ll be automatically redirected to something relevant to what they were looking for.
Do 404 Errors Hurt SEO?
Personally, I would have to give the wishy-washy answer of "it depends.” Generally, 404 Errors don’t impact your site’s ranking in Google, and you can safely ignore them. But, if you have a broken link pointing to a 404 then ‘yes’ you are losing PR.
Seeing that we are talking about making changes to your permalink structure, I would have to go with the later. The best way to prevent a 404 is to not change your permalink format if your site has been active for a while, unless you have a backup plan to redirect old URLs to new URLs.
Choosing Your Permalink Structure
Personally I prefer doing just the post %postname%. This means that if I ever want to change a post to a page then I can keep the URL structure in tact & not have to worry about redirecting pages – that is pretty much what I do.
The other thing I do also on every post is try to make my URL's comprehendible. That is one of those things that I wish I had known when I first started working with Permalinks in WordPress. Not so much for the search engine, but users appreciate readable URLs. It gives them a hint of what they will be getting. I know that a readable URL greatly increases the likelihood that I will click on something (in an email, for instance). Again, this about maximizing your clickthrough rates.
So, assuming you're starting with a fresh installation of WordPress. Please follow the steps below:
1. Log in to your WordPress Administration Panel (Dashboard).
2. Click the Settings
3. That done, click Permalinks
4. In permalinks settings please select Custom structure, after that copy and past the following settings /%postname%/
5. With that done, click the Save changes button.
How to Change Your Permalinks Without 404
Is setting up the custom permalink structure something that can only be done at the beginning? Or, what if in the original install you left permalinks in the original setting and now you have a couple of hundred posts then you woke up today and just decided to change your permalink format? Will WordPress remember your old structure or will Google say you have a bunch of ‘404 Not Found’ errors! Is there a way to change your permalinks without 404 or are you crazy for even thinking that?
This is where things get tricky. Google may have already crawled itself through your site and indexed these pages, perhaps assigned a page rank, and placed you somewhere in the search engines or whatever.
Now here you come along, all nonchalantly, changing your permalinks and the next thing you know, you look in Webmaster Tools and the Crawl Errors Page is full of ‘404 Not found’ error pages! NOOOOO!!!!!
Use Redirects (But Proceed With Caution).
Granted, 301 redirects do pass between 90-99% of link juice (ranking power) to the redirected page. However, the reason I'm saying that is because sometimes when you 301 redirect pages or sites, Google may temporarily drop the original URL and it takes a while to get it ranked again.
That's why I want to caution you about just slapping 301 redirects everywhere, no matter even if it does work. Also if you're puzzled by such questions as what is a 301 redirect and how do I write the 301 redirect code, try something a little less intimidating, like this Permalink Finder plugin that detects when WordPress cannot find a permalink and tries to locate any posts with similar words.
This is a very useful plugin that automatically searches the database for a match. It takes the best match and then, rather than issuing a 404 Error it sends back a redirect to the correct page. Users will see the page that they are looking for, and search engine spiders will see the 301 redirect and update their databases so that the page appears correctly in searches.
This is especially useful if you are not familiar with .htaccess and rewrite rules, then going with a plugin is a much better option.