ATOMSEO
  • Log In
  • Sign Up
ATOMSEO

A Detailed Guide to Website Redirects:
Types, Practical Usage and Implementation Tips

Website redirects are essential for web admins and crucial for maintaining SEO, improving user experience, and managing website changes effectively. This article will explore what redirects are, why they are important, when to use them, the different types of redirects, how to implement them, and best practices to follow.

1. What Is a Redirect?

HTTP redirect is a way to send users and search engines to a URL other than the one they originally requested. This can be useful for numerous reasons, such as changing the structure of a website, consolidating pages, or ensuring the correct URL is used.

2. Why Are Redirects Important?

URL redirects are important for several reasons:

1.    Maintaining SEO Value: Redirects help preserve the SEO value of existing pages when their URLs change. This ensures that the page's rankings and link equity are not lost.

2.    User Experience: Redirects ensure users land on the right page, even if the URL has changed. This helps in providing a seamless browsing experience.

3.    Managing Content Changes: Whether you are deleting outdated content, moving pages, or consolidating information, redirects help manage these changes without breaking links or losing traffic.

3. When to Use Redirects

Redirect links are crucial for managing website changes and ensuring a smooth user experience. Here are some common scenarios when you should use redirects:

1.    Changing URL Structure: When you update your website's URLs to improve SEO or enhance user experience, redirects ensure that visitors and search engines are directed to the correct new URLs.

2.    Domain Change: When moving your site to a new domain, redirects help retain traffic and preserve the SEO value accumulated by the old domain.

3.    Content Deletion: If you delete pages, setting up redirects will direct users to relevant alternative pages, preventing them from landing on a 404 error page.

4.    Page Merging: When consolidating multiple pages into one, redirects ensure that all traffic and link equity from the old pages is transferred to the new, consolidated page.

5.    Category Tags or Parent Pages: If you add category tags or parent pages that affect the URLs, redirects ensure user access and search engine indexing continuity.

6.    Website Maintenance: Temporary redirects can be used when a webpage is being maintained, guiding users to a different page while the original is being updated.

7.    HTTP to HTTPS Migration: When migrating your site from HTTP to HTTPS, redirects ensure all traffic is directed to the secure version of your website.

You can apply redirects to a single URL, a group of URLs, or even an entire domain. The type of redirect you choose (e.g., 301 for permanent changes and 302 for temporary ones) depends on the specific situation. Using redirects correctly helps maintain the integrity of your site's structure, SEO value, and user experience.

4. Redirect Types

There are several types of redirects, each serving different purposes:

  • 301 Redirect (Permanent)
A 301 redirect is a permanent redirect from one URL to another. It passes most of the SEO value from the old URL to the new one. This type of redirect is commonly used when a page has been permanently moved or deleted.

  • 302 Redirect (Temporary)
A 302 redirect is a temporary redirect. It tells search engines that the move is temporary and the original URL will be back. This type is used when a page is temporarily unavailable due to maintenance or updates.

  • 303 Redirect (See Other)
A 303 redirect to a confirmation page is used after a PUT or POST request. This type of redirect indicates that the requested resource can be found at another URL using a GET request. It is commonly used in web forms.

  • 307 Redirect (Temporary)
Similar to a 302 redirect, a 307 redirect indicates that a page is temporarily moved, but it adheres to the HTTP/1.1 specification. It ensures that the request method does not change (e.g., a POST request remains a POST request).

  • 308 Redirect (Permanent)
A 308 redirect is similar to a 301 redirect, indicating a permanent move. However, it also ensures that the request method remains unchanged. This type of redirect is helpful when maintaining the original request method is crucial.

  • Meta Refresh
A meta refresh is a type of redirect executed at the page level rather than the server level. It is generally slower and less SEO-friendly. A typical example is a "5 seconds" delay before redirecting to a new page. Meta refreshes are often used for short-term page updates or informational notices.

  • JavaScript Redirects
JavaScript redirects are implemented using JavaScript code on a webpage. They can be used to redirect users dynamically based on certain conditions (e.g., user actions, screen size). However, these HTTP redirects are less reliable for SEO because search engines may not consistently execute the JavaScript code.

5. How to Implement Redirects

Implementing website redirects is crucial for maintaining a seamless user experience and preserving SEO value. The method you use will depend on your server environment and the specific type of redirect needed. Here are some common methods:

Using .htaccess (for Apache Servers)

For Apache servers, you can manage redirects using the .htaccess file. This method requires some server configuration knowledge and is typically suited for experts. Mistakes in the .htaccess file can lead to significant issues on your website.

Enable RewriteEngine:
Ensure the RewriteEngine module is enabled in your .htaccess file:

apache
<IfModule mod_rewrite.c>
RewriteEngine On
</IfModule>

301 Redirect Example:

To permanently redirect from one URL to another, add the following code:

apache
Redirect 301 /old-page.html http://www.yoursite.com/new-page.html

Redirect a Single Folder:

To redirect a folder and its contents:

apache
RewriteRule ^folder/(.*)$ /location/$1 [R=301,NC,L]

Redirect to Another Domain:

To redirect all traffic from your current domain to a new domain:

apache
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]

Redirect Non-www to www:

If you want to ensure all traffic uses the www subdomain:

apache
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

Redirect www to Non-www:

To redirect from www to non-www:

apache
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

Redirect HTTP to HTTPS:

To ensure all traffic is redirected to the secure HTTPS version:

apache
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L]

Ensure you have an SSL certificate before implementing this redirect.

Using Nginx Configuration

For Nginx servers, redirects are configured in the server configuration file. This method is straightforward but requires access to the server's configuration.

301 Redirect Example:

nginx
server {
   listen 80;
   server_name yoursite.com;
   location /old-page.html {
       return 301 http://www.yoursite.com/new-page.html;
   }
}

Using CMS Plugins

For those using Content Management Systems (CMS) like WordPress, plugins are available to manage redirects easily. Popular plugins include Redirection and Yoast SEO. These plugins provide a user-friendly interface for setting up and managing redirects without needing to edit server files directly.
Example of redirect creatiion in WordPress plugin
Meta Refresh

Meta refresh redirects are executed at the page level. They are generally slower and less SEO-friendly, and they are often used for short-term changes.

Meta Refresh Example:

Add the following code within the <head> section of your HTML page:

html
<meta http-equiv="refresh" content="5;url=http://www.yoursite.com/new-page.html">

Whether you use .htaccess for Apache, configuration files for Nginx, CMS plugins, or meta refresh, each method has its use cases and best practices. Choose the method that best fits your technical comfort level and your website's specific needs.
302 redirect example in Screaming Frog

6. Redirect Best Practices

Implementing redirect pages correctly is essential to maintain SEO value, ensure a good user experience, and manage site changes effectively. Here are some best practices to follow:

1.   Use the Correct Redirect Type: Choose a 301 redirect for permanent changes and a 302 redirect for temporary ones. This helps search engines understand the nature of the change and handle the SEO implications appropriately. To find out the difference between 301 and 302, read our article.

2.   Always Redirect to Closely Matched Content: Ensure the new page's content is closely related to the old page’s content. For example, redirect an expired specials page to your main specials page instead of the homepage. This preserves user experience and ensures search engines pass on the authority of the old page, avoiding soft 404 errors.

3.   Avoid Redirect Chains and Loops: Redirect chains occur when a URL is redirected multiple times before reaching the final destination. In contrast, redirect loops occur when URLs redirect back and forth between each other. These can slow page load times, dilute link equity, and hurt SEO. Always redirect directly from the original URL to the final URL to avoid these issues.

4.   Update Internal Links: When you set up HTTP redirects, ensure all internal links are updated to point directly to the new URL. This prevents unnecessary redirects and helps maintain a clean link structure, which is better for users and search engines.

5.   Monitor Redirects and Fix 404 Errors: Regularly check your site for broken links and incorrect redirects using tools like Google Search Console or third-party audit tools (for example, Atomseo Broken Link Checker). Fixing 404 errors by redirecting them to relevant pages helps regain lost link authority and ensures a smooth user experience.
Redirect report in Google Search Console
Redirect report example in Atomseo Broken Links Checker
6. Redirect to Avoid Duplicate Content: Use redirects to resolve duplicate content issues caused by different URL variations. This includes:

  • Non-www and www URLs
  • HTTP and HTTPS URLs
  • Trailing-slash and non-trailing-slash URLs
  • Capitalized and lower-case URLs

Consolidating these variations into a single preferred URL helps search engines understand which page to rank, thus avoiding content duplication.

By following these best practices, you can ensure that your website redirects are effective, preserving SEO value and providing a seamless user experience.
Understanding and correctly implementing URL redirects is essential for maintaining your site's SEO value, ensuring a good user experience, and effectively managing site changes. By following the guidelines and best practices outlined in this article, you can ensure that your website's redirects are set up correctly and contribute positively to its performance and SEO.

For regularly auditing and updating your redirect pages, use Atomseo Broken Links Checker. This convenient tool for identifying website errors allows you to check up to 1500 links per day for free.

7. Relevant Links