{
    "title": "301 redirect",
    "seo_title": "301 redirect: definition, use and mistakes to avoid",
    "h1": "301 redirect",
    "description": "301 redirect: how it differs from 302 and 308, setup on Apache, Nginx and WordPress, and the mistakes that cost traffic during a site migration.",
    "lead": "A 301 redirect is an HTTP response telling browsers and search engines that a URL has moved permanently to another one. Visitors land on the new URL, and Google treats the redirect as a strong signal to index the new address instead of the old one.",
    "language": "en",
    "locale": "en-US",
    "type": "definition",
    "url": "https://www.wp-feint.com/glossary/301-redirect/",
    "canonical": "https://www.wp-feint.com/glossary/301-redirect/",
    "markdown": "https://www.wp-feint.com/glossary/301-redirect/index.md",
    "json": "https://www.wp-feint.com/glossary/301-redirect/index.json",
    "published": "2026-10-28T08:00:00+00:00",
    "modified": "2026-11-22T12:08:24+00:00",
    "site": {
        "name": "WP Feint",
        "url": "https://www.wp-feint.com/"
    },
    "translations": [
        {
            "language": "en",
            "hreflang": "en-US",
            "title": "301 redirect",
            "url": "https://www.wp-feint.com/glossary/301-redirect/",
            "markdown": "https://www.wp-feint.com/glossary/301-redirect/index.md",
            "json": "https://www.wp-feint.com/glossary/301-redirect/index.json"
        },
        {
            "language": "fr",
            "hreflang": "fr-FR",
            "title": "Redirection 301",
            "url": "https://www.wp-feint.com/fr/definitions/redirection-301/",
            "markdown": "https://www.wp-feint.com/fr/definitions/redirection-301/index.md",
            "json": "https://www.wp-feint.com/fr/definitions/redirection-301/index.json"
        },
        {
            "language": "es",
            "hreflang": "es-ES",
            "title": "Redirección 301",
            "url": "https://www.wp-feint.com/es/glosario/redireccion-301/",
            "markdown": "https://www.wp-feint.com/es/glosario/redireccion-301/index.md",
            "json": "https://www.wp-feint.com/es/glosario/redireccion-301/index.json"
        },
        {
            "language": "de",
            "hreflang": "de-DE",
            "title": "301-Weiterleitung",
            "url": "https://www.wp-feint.com/de/glossar/301-weiterleitung/",
            "markdown": "https://www.wp-feint.com/de/glossar/301-weiterleitung/index.md",
            "json": "https://www.wp-feint.com/de/glossar/301-weiterleitung/index.json"
        },
        {
            "language": "it",
            "hreflang": "it-IT",
            "title": "Redirect 301",
            "url": "https://www.wp-feint.com/it/glossario/redirect-301/",
            "markdown": "https://www.wp-feint.com/it/glossario/redirect-301/index.md",
            "json": "https://www.wp-feint.com/it/glossario/redirect-301/index.json"
        },
        {
            "language": "pt",
            "hreflang": "pt-BR",
            "title": "Redirecionamento 301",
            "url": "https://www.wp-feint.com/pt/glossario/redirecionamento-301/",
            "markdown": "https://www.wp-feint.com/pt/glossario/redirecionamento-301/index.md",
            "json": "https://www.wp-feint.com/pt/glossario/redirecionamento-301/index.json"
        },
        {
            "language": "nl",
            "hreflang": "nl-NL",
            "title": "301-redirect",
            "url": "https://www.wp-feint.com/nl/woordenlijst/301-redirect/",
            "markdown": "https://www.wp-feint.com/nl/woordenlijst/301-redirect/index.md",
            "json": "https://www.wp-feint.com/nl/woordenlijst/301-redirect/index.json"
        }
    ],
    "headings": [
        {
            "level": 1,
            "text": "301 redirect"
        },
        {
            "level": 2,
            "text": "Permanent or temporary: the different codes"
        },
        {
            "level": 2,
            "text": "Setup examples"
        },
        {
            "level": 2,
            "text": "For WordPress"
        },
        {
            "level": 2,
            "text": "Common mistakes"
        }
    ],
    "body": "Changing a page's URL without telling search engines is like moving without forwarding your mail: links pointing to the old URL land on a [404 error](https://www.wp-feint.com/glossary/404-error/), and the page starts over from scratch. A 301 redirect prevents that loss. The server responds with a 301 (Moved Permanently) status code along with a `Location` header giving the new URL, and the browser loads it automatically.\n\n## Permanent or temporary: the different codes\n\n| Code | Type | Effect for Google |\n| --- | --- | --- |\n| 301, 308 | Permanent | Strong signal that the target should become the [canonical URL](https://www.wp-feint.com/glossary/canonical-url/) |\n| 302, 303, 307 | Temporary | The old URL may stay in the results |\n| Instant meta refresh | Treated as permanent | Only for cases where the server can't redirect |\n| JavaScript redirect | Last resort | Only seen if the page renders successfully |\n\nGoogle recommends a permanent redirect when you are sure it won't be reversed, and a server-side redirect whenever possible. When URLs change, it advises keeping the redirects in place as long as possible, generally at least a year, and pointing each old URL directly to its final destination.\n\n## Setup examples\n\nOn Apache or LiteSpeed, in the [.htaccess](https://www.wp-feint.com/glossary/htaccess/) file, placed before the WordPress rules:\n\n```\nRedirect 301 /old-post/ https://www.example.com/new-post/\n```\n\nOn Nginx, in the `server` block:\n\n```\nlocation = /old-post/ { return 301 https://www.example.com/new-post/; }\n```\n\n## For WordPress\n\nWhen you change the slug of a published post, WordPress remembers the old one and automatically issues a 301 redirect to the new permalink. This mechanism doesn't cover everything: a change of permalink structure, a page merge or a domain migration requires explicit rules, set on the server or with a redirection plugin that also logs 404s. After a migration, test a sample of old URLs and check that they lead to the right page in a single hop.\n\n*Video: “301 Redirects Explained In Under 4 Minutes | Help Your Site's SEO!” (WebFX)*\n\n## Common mistakes\n\n- **Redirect chains**: HTTP to HTTPS, then to www, then to the new URL. Each hop adds latency; Google's crawlers follow up to ten hops, but visitors pay for every round trip.\n- **Sending everything to the home page**: visitors don't find what they were looking for. Redirect to the equivalent page, or leave a real 404 if there isn't one.\n- **A 302 left in place** after a permanent move, often the default in some tools.\n- **Redirects you didn't create**: a hacked site can redirect some visitors to spam depending on where they come from. If visitors report strange redirects, read our article on [SEO spam after a hack](https://www.wp-feint.com/hacked-wordpress-site-seo-spam-deindexing/).\n\nDon't confuse this with file aliases: changing the public URL of a theme's files isn't a page move and doesn't follow the same logic, as detailed in our article on [masking WordPress and SEO](https://www.wp-feint.com/hide-wordpress-seo-impact/).\n\n## Related terms\n\n- [404 error](https://www.wp-feint.com/glossary/404-error/)\n- [Canonical URL](https://www.wp-feint.com/glossary/canonical-url/)\n- [Duplicate content](https://www.wp-feint.com/glossary/duplicate-content/)\n- [htaccess file (.htaccess)](https://www.wp-feint.com/glossary/htaccess/)\n- [nginx.conf](https://www.wp-feint.com/glossary/nginx-conf/)\n\n\n## Sources\n\n- [Google Search Central : redirections et recherche Google](https://developers.google.com/search/docs/crawling-indexing/301-redirects)\n- [Google Search Central : déplacer un site en modifiant les URL](https://developers.google.com/search/docs/crawling-indexing/site-move-with-url-changes)\n- [WordPress Developer Resources : wp_old_slug_redirect()](https://developer.wordpress.org/reference/functions/wp_old_slug_redirect/)",
    "definition": "A 301 redirect is an HTTP response telling browsers and search engines that a URL has moved permanently to another one. Visitors land on the new URL, and Google treats the redirect as a strong signal to index the new address instead of the old one.",
    "group": "SEO and marketing",
    "aka": [
        "permanent redirect",
        "301 Moved Permanently",
        "301 status code",
        "URL redirect"
    ],
    "related": [
        {
            "title": "404 error",
            "url": "https://www.wp-feint.com/glossary/404-error/",
            "markdown": "https://www.wp-feint.com/glossary/404-error/index.md"
        },
        {
            "title": "Canonical URL",
            "url": "https://www.wp-feint.com/glossary/canonical-url/",
            "markdown": "https://www.wp-feint.com/glossary/canonical-url/index.md"
        },
        {
            "title": "Duplicate content",
            "url": "https://www.wp-feint.com/glossary/duplicate-content/",
            "markdown": "https://www.wp-feint.com/glossary/duplicate-content/index.md"
        },
        {
            "title": "htaccess file (.htaccess)",
            "url": "https://www.wp-feint.com/glossary/htaccess/",
            "markdown": "https://www.wp-feint.com/glossary/htaccess/index.md"
        },
        {
            "title": "nginx.conf",
            "url": "https://www.wp-feint.com/glossary/nginx-conf/",
            "markdown": "https://www.wp-feint.com/glossary/nginx-conf/index.md"
        }
    ],
    "sources": [
        {
            "title": "Google Search Central : redirections et recherche Google",
            "url": "https://developers.google.com/search/docs/crawling-indexing/301-redirects"
        },
        {
            "title": "Google Search Central : déplacer un site en modifiant les URL",
            "url": "https://developers.google.com/search/docs/crawling-indexing/site-move-with-url-changes"
        },
        {
            "title": "WordPress Developer Resources : wp_old_slug_redirect()",
            "url": "https://developer.wordpress.org/reference/functions/wp_old_slug_redirect/"
        }
    ],
    "format": "application/json"
}