Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How long do I need to maintain old URLs?

Ok, I know it is best practice that once you change or remove a page URL, to redirect that url to the new relevant URL.

But for how long? forever?

For example, I am using Google website optimizer to test different variations of a page. So I have to create a different url for each like: original.php, var1.php, var2.php, etc.

once the test is done, the winner will become the new original.php and there will be no need to keep var1.php, etc. But I now need to redirect those no longer needed URL's to the relevant original.php.

This can end up being a ALOT of 301 redirects in my .htaccess file. I also have heard that the more stuff you have in your .htaccess file the slower your site becomes because the server has to process everything in it before it can serve a page.

I can move the redirects to the actual URLs (example a php redirect on the actual var1.php file) but then I have several unneeded files bloating up my server.

So I am wondering whats the best practice here? is it safe to remove a 301 redirect after so long?

like image 349
JD Isaacks Avatar asked Jun 30 '10 13:06

JD Isaacks


People also ask

How long do I need to keep 301 redirects?

As a best practice, when moving pages you should implement 301 redirects from the previous URLs to the new ones and keep them active for at least 1 year. When moving entire domains to new domains, you should keep them active for as long as reasonably possible.

Can you reuse a URL?

To reuse a survey URL, you must change the survey short name on the survey that is currently using the URL so that it frees the URL up for reuse. The survey short name forms part of the survey's Public URL and is the only part of the Public URL that you can amend.

Do 301 redirects expire?

In the absense of cache control directives that specify otherwise, a 301 redirect defaults to being cached without any expiry date. That is, it will remain cached for as long as the browser's cache can accommodate it.


1 Answers

You can check your web server's access logs for the 301 redirects on those URLs. When they no longer appear in the logs (or appear very rarely), you can remove the redirects if you feel like it. There is no particularly best time to remove them. The "best" time is when the old URLs are no longer used, and that can differ a lot from site to site.

like image 97
Daniel Egeberg Avatar answered Oct 16 '22 23:10

Daniel Egeberg