301 Redirect

SEO

An HTTP status code that tells browsers and search engines a URL has permanently moved, passing most link equity from the old URL to the new one.

Definition

A 301 redirect is the HTTP response code for "Moved Permanently." When a server returns a 301 for a URL, it signals that the requested resource has permanently moved to a new location, included in the `Location` header of the response. Browsers follow the redirect automatically, and search engines update their index to point to the new URL.

301 redirects differ from 302 (temporary), 307 (temporary, method preserved), and 308 (permanent, method preserved). For SEO purposes, 301 and 308 both pass link equity. 302 and 307 are treated as temporary and historically transferred less authority, though Google has stated modern handling is similar.

Why It Matters

301 redirects are the safest way to change URLs without losing accumulated SEO value. When you rename a page, consolidate duplicate content, migrate to a new domain, or switch from HTTP to HTTPS, a 301 tells search engines "this page is now here, please give the new URL all the authority the old one earned."

Broken redirects are one of the most common SEO mistakes after a site migration. Missing a 301 for a high-traffic URL can erase years of accumulated ranking authority overnight. Conversely, redirect chains (one URL redirecting to another that redirects again) waste crawl budget and dilute link equity, so redirects should always point directly to the final destination.

Examples

A 301 redirect is configured at the server level, not in HTML. Different servers have different syntax, but the result is the same:

nginx
# Nginx
server {
    listen 80;
    server_name example.com;

    # Permanent redirect of one URL to another
    location = /old-blog-post {
        return 301 /new-blog-post;
    }

    # Redirect an entire old domain to the new one
    if ($host = old-example.com) {
        return 301 https://example.com$request_uri;
    }
}
apache
# Apache .htaccess
Redirect 301 /old-blog-post /new-blog-post

# Domain-wide redirect
RewriteEngine On
RewriteCond %{HTTP_HOST} ^old-example\.com$ [NC]
RewriteRule ^(.*)$ https://example.com/$1 [R=301,L]

Testing the result is simple with curl:

bash
$ curl -I https://example.com/old-blog-post
HTTP/2 301
location: /new-blog-post
cache-control: max-age=3600

The `301` status line and `location` header confirm the redirect is working.

All Glossary Terms
See it in action

Every article on our blog was written by Acta AI. No edits. No ghostwriter.

Read Our BlogStart Free Trial