You are here:
- Manual
- Development
- Stable, unique URLs
- Creation
- Redirection
Stable, unique URLs: Redirection for moved content
Sometimes, a page needs to be moved and links are adapted. However, it is possible that visitors will try to access the page by way of the original URL. This will generate an error message. It is very helpful if these visitors are then redirected to the page they were seeking.
Provide redirection to the new location when information is moved.
Guideline R-pd.4.4
In case of a page deletion rather than relocation, see the chapter Contingency Design.
It is often possible, by studying the log files of the web server, to find out how often a relocated page has produced an error message (“404, Not Found“) and which URL is subsequently followed. Web developers are advised to redirect URLs that are often requested but not found.
Automatic redirection or not?
When there is no need to inform a visitor that a requested URL is unavailable, automatic redirection is appropriate. When the visitor must be informed, show a page with directions and a normal link to the new location of the requested page.
A convenient method for automatic redirection is creating a script on the server (for example PHP or ASP) where the visitor will be redirected in case a page does not exist on the requested URL. This script evaluates which outdated URL it is and automatically redirects the visitor to the correct URL.
Never use a delayed automatic redirection; don’t make assumptions on how fast the visitor will read or act.
Methods for automatic redirection
An method often used for redirecting visitors from an old location to the new one is by placing a (script) file on the original location, that handles the redirection. These pages may use the following techniques.
