X
    Categories: GoogleSEO

Google: Best Practices for 301s in Large Htaccess Files

Someone raised an interesting question on Twitter today… what to do about older 301 redirects, especially when the redirect file begins to get a bit long and complicated.  Could they be deleted after a time?  Or should you keep them in their massive files with the potential server slowdown for visitors?

Gary Illyes from Google said that once the new page is indexed, it could be removed.  Of course, this is purely from a technical standpoint of when can you remove a 301. Sites do not need to keep up 301 redirects up for eternity in order for Google to figure out old pages should be matched with a specific brand new one.

However, it obviously goes well beyond that too.  Keeping those 301 redirects if any of the older pages have incoming links to them or actual visitors redirecting through them, then obviously keeping those 301 redirects is the best practice.

Illyes followed up with clarification as well, from a best practices point of view:

Now depending on the size, having a super long .htaccess file can slow down the server… but again the size isn’t the only factor in the equation, because the server itself also plays a role, and a server’s performance can also vary greatly.

Bottom line, if you have a 301 redirect, you can remove it once Google has crawled it and matched up the old page with the new one.  But if you can leave it indefinitely, that is the best route to go, especially if you need to redirect linking signals or actual visitors to the new page.  Then you never have to worry about losing those older ranking signals or landing visitors onto a 404 page rather than the page they wanted to go to.

The following two tabs change content below.

Jennifer Slegg

Founder & Editor at The SEM Post
Jennifer Slegg is a longtime speaker and expert in search engine marketing, working in the industry for almost 20 years. When she isn't sitting at her desk writing and working, she can be found grabbing a latte at her local Starbucks or planning her next trip to Disneyland. She regularly speaks at Pubcon, SMX, State of Search, Brighton SEO and more, and has been presenting at conferences for over a decade.
Jennifer Slegg :Jennifer Slegg is a longtime speaker and expert in search engine marketing, working in the industry for almost 20 years. When she isn't sitting at her desk writing and working, she can be found grabbing a latte at her local Starbucks or planning her next trip to Disneyland. She regularly speaks at Pubcon, SMX, State of Search, Brighton SEO and more, and has been presenting at conferences for over a decade.