I’m about to work on a retail product website that has been around for about 10 years. The website ranks nicely in Google search results. The website has evolved a lot over the years so it’s no surprise their .htaccess file is full of 301 redirects and rewriterules. There are so many rules it’s an eye sore. Sometimes there are three different legacy urls that 301 redirect to the same destination. I’m concerned this file will be a nightmare to maintain down the road.
Does a web developer ever reach a point where he’s willing to remove old redirect and rewrite rules for easier maintenance at the cost of SEO? Or does Google have a copy of the website’s 301 redirects, in which case, I can remove them from my .htaccess file without any SEO penalty?
How does a developer deal with a messy/lengthy .htaccess file?
You’re stuck with them. Think about this. If another site has a link that goes here:
And you have this 301ed to:
What would happen if you removed that 301 (and oldpage.html doesn’t exist)? Most likely your site will return a 404 error which would result in google removing the link (and “link juice”) to your site. Thus reducing the SEO.
As far as I know google doesn’t “remember” old 301 redirects. Because what would happen if all of a sudden you recreated oldpage.html? If google remembered the 301, then oldpage.html would never get indexed.