I like to think I'm pretty clued up with using WordPress. As long as I don't edit the code of the theme, there is only so much damage one can do to their website, right?
One evening I was bored and figured I would ‘optimise' my WordPress blog because I had nothing better to do. I ended up landing on the Permalink section which allows you to structure your URL links.
My current structure was:
There was little reason to have the date of each post in the URL and it would be much better for SEO if it read as:
So I simply edited my permalink structure to remove the date and went to get a glass of warm milk thinking how much better my site would rank in Google. On my return, I found that every single internal link on my site was returning a 404 error, and when a searcher found my site through Google, as I changed the URL structure of all my links, they were presented with a 404 error.
301 and 302 redirects
When you change the location of a webpage (by editing the URL structure) you have two choices to redirect them to the new location. They are:
301 redirect – permanently redirects traffic to the new URL, no 404 error is shown and 90-99% of Page Rank from the old URL is passed to the new article.
302 redirect – temporally redirects traffic to the new URL, but tells Google this will not be a permanent redirect. As a result Google does not pass Page Rank which can affect website rankings.
It was around 11pm so I called my host provider and told them what I'd done. They said they would take care of it by reversing my permalinks change, and for the short-term place a 302 redirect on all my links to avoid 404 errors.
Why you should never use a 302 redirect
The next morning I woke up, logged into my WordPress account expecting to see everything back to normal and I see this:
I was down around 70% of organic traffic and keywords that I ranked 1#, 2# and 3# on Google had all disappeared. After throwing several things around my room and contemplating suicide, I checked my Google Webmaster Tools to see what was going on.
It turned out I had no manual penalty from Google which good news. The bad news was Google re-crawled my sitemap overnight and saw the 302 redirects. I looked at my Google Analytics I was only ranking for long-tail keywords.
Since I had no website penalty, the reason for the drop in rankings were because I was using a 302 redirect.
I needed to fix this fast and searched online for solutions, but there is little out there that provides any great information.
My website has over 165 pages which were all listed as 302 redirects since the last Google crawl. My first decision was to call my host and get them to change everything to a 301 redirect which they did. You can do this yourself by messing with the .htaacess file but I pay a lot for hosting and don't like messing with that sort of stuff.
The next step was to tell Google to re-crawl my site, but we all know what they are like with requests, they will do it when they are ready. Thankfully, I knew about their Google Fetch tool, which allows website owners to directly ask Google to re-crawl a particular page.
Each month you can request 500 individual pages to be fetched and re-indexed, and 10 pages indexed including all links on that page (best used with a website sitemap).
One by one I entered every URL of my site for Google to re-crawl and index. An hour later it was done. Google claims to crawl your website within a few minutes of the request, but when they index your pages on their search engine is anyone's guess.
I'd constantly check their search engine and found that some articles had been re-indexed within minutes, while others took hours, days or even weeks. There is no set pattern to when they index pages or methods they use to do so. Well not that I know of.
Here's what my crawl stats looked like over the last 90 days after using Google Fetch:
Within 72 hours my website was more or less running back to normal. As far as I can tell, a few pages still need to be re-indexed by Google but they have gotten to 95% of them:
I wrote this article as a lesson to warn others about messing around with WordPress and using 302 redirects. As I said earlier, I thought I was a hotshot on WordPress but I guess I know less than I think.
Luckily, I got my rankings back in 3 days but others said it took them weeks or months. I'd only lost a $100 or so in sales but I've learned my lesson not to play around with features I don't have much experience in, or to use a 302 redirect again.