Managing URIs

Moving and renaming Web resources

It is generally better to be very cautious when publishing a new resource on the Web, including with regards to the location and name used for the resource, as explained in "Choose URIs wisely". However, there are many potentially good reasons to move or rename a resource. And this should not be a problem.

Unless, of course, this operation is not performed properly. When poorly done, moving or renaming a Web resource breaks hyperlinks from other Web resources, makes people's bookmarks irrelevant, and confuses caches and Web search engine. In short, it draws traffic away.

There is, however, a way to perform this moving or renaming operation without the unpleasant side effect of breaking links and losing traffic. The solution is simply to use standard HTTP redirects to point users and agents to the new location: temporary redirects, permanent redirects, and as we will see below, there is even a way to express that a resource has not only been moved, but actually removed.

Removing Web resources

Even though the Web is thought of as a "permanent" media where documents would, ideally, reside forever, this does not mean that resources cannot be removed once they have been published on the Web. However, should you choose to remove a resource, should do it in a way that informs readers, caches and user-agents that it has not just disappeared, but was removed on purpose.

The correct way to achieve this is to configure your Web server to send the "410 Gone" status, instead of the well-known "404 not found" when requested these resources you have chosen to remove.

Further Reading

About the "QA Tips"

The W3C QA Tips are short documents explaining useful bits of knowledge for Web developers or designers, hosted and produced by the Quality Assurance Interest Group at W3C.

While the tips are carefully reviewed by the participants of the group, they should not be seen as anything else than informative bits of wisdom, and especially, they are not normative W3C technical specifications.

Learn more about the Tips, how to submit your own pearls of wisdom, and find all the other QA tips in the Tips Index.

Created Date: 2003-10-08 by olivier Thereaux
Last modified $Date: 2006/11/24 01:20:25 $ by $Author: ot $