How long do I need to maintain old URLs?

Well, I know that when changing or deleting a page URL, it is best to redirect that URL to the new corresponding URL.

But how long? forever and ever?

For example, I use Google’s website optimizer to test various page variations. So I need to create a different url for each type: original.php, var1.php, var2.php, etc.

Once the test is completed, the winner will be the new original.php file, and there will be no need to store var1.php, etc. But now I need to redirect those that are no longer needed by the URLs to the corresponding .php original.

It could be ALOT 301 redirects in my .htaccess file. I also heard that the more things you have in your .htaccess file, the slower your site becomes, because the server must process everything in it before it can serve the page.

I can move the redirects to the actual URLs (like redirecting php to the actual var1.php file), but then I have some unnecessary files that inflate my server.

So I wonder what is the best practice here? is it safe to remove 301 redirects after that?

+6
source share
4 answers

You can check the web server access logs for 301 redirects to these URLs. When they no longer appear in magazines (or appear very rarely), you can remove redirects if you like it. There is no better time to remove them. The “best” time is when the old URLs are no longer used and can vary greatly from site to site.

+11
source share

When you test options, this is a private URL. As long as there are no external links to it, and you do not publish it, you can destroy it when your tests are completed.

If you share it only with others in your organization, by convention that this is ephemeral, this is a gray area. Daniel Egeberg’s proposal to keep the expedition civilized for some time.

After you make the URL public, you should consider it as archived. This means that you make sure that it works forever . There are a few exceptions that I can indulge:

  • Someone made a force majeure and closed the entire domain, like Geocities. Do not let this happen to you: do not put your valuable web pages under the control of non-profit organizations.

  • Someone bought your domain from under you with an offer that you could not refuse.

  • You went bankrupt or can no longer afford to maintain an online presence.

In these cases, your moral obligation is to make your content available through archive.org or through Jason Scott , who has a lot of good advice.

If you control your own domain and you allow the public URL to become obsolete, you will burn in hell. (Little-known theology after Dante.)

+1
source share

There may be a better way to manage your .htaccess file. Are your redirects for individual pages, paths, subdomains or domains?

You may be able to include an external file so that your redirects are in their own file, and .htaccess includes it and remains uncluttered.

Finally, there may be a better way to support your call forwarding. So instead of focusing on how long to maintain your redirects, save some maintenance work and change your question to ask about mechanisms that make adding and organizing your redirects easier. IIRC mod_rewrite will do this. There should be a mechanism that allows your server to detect redirects using a script (possibly request a database). At a minimum, it would be prudent to use a script to control the redirection of .htaccess files.

The advantage is that call forwarding never ends, because you also never have to go back and clear old redirects. They just sit there forever. If you have redirects that are expiring, you now have a second operation to delete old redirects. That way, you are actually doing more work, ending with a redirect.

0
source share

Norman, of course, if the page is generated by php, then it cannot be considered archival. php almost guarantees that next time the page will look different. If in another way you choose "not there", then it is up to you!

I would also suggest that you can opt out of these pages if people use them without redirecting, but by placing a link that says the page has moved and asking them not to use the old one. Put a link for them. Do it "for a while." I assume that the period depends on the expected user behavior. Do you expect each user to visit once a month, or is it like a tax return system that people use once a year?

0
source share

All Articles