{"id":178,"date":"2026-07-27T17:51:42","date_gmt":"2026-07-27T12:21:42","guid":{"rendered":"https:\/\/jnkplugins.com\/blog\/redirect-url-wordpress\/"},"modified":"2026-07-30T14:51:32","modified_gmt":"2026-07-30T09:21:32","slug":"redirect-url-wordpress","status":"publish","type":"post","link":"https:\/\/jnkplugins.com\/blog\/redirect-url-wordpress\/","title":{"rendered":"How to Redirect a URL in WordPress (3 Ways)"},"content":{"rendered":"<p>A <strong>redirect<\/strong> tells a browser \u2014 and a search engine \u2014 that the URL it just asked for now lives somewhere else. Set one up and anyone hitting the old address lands on the new page automatically, instead of on a 404. It&#8217;s one of the few maintenance jobs on a WordPress site that&#8217;s genuinely quick to do and genuinely costly to skip.<\/p>\n<p>This guide covers when you actually need a redirect, which status code to use (they are not interchangeable), and three ways to set one up in WordPress \u2014 a plugin, your web server config, or PHP. We&#8217;ll finish with the mistakes that turn a good redirect into a slow-motion SEO problem, and how to test that the thing you just set up is really doing what you think.<\/p>\n<h2>When you need a redirect<\/h2>\n<p>Not every URL change needs one, but these four situations almost always do:<\/p>\n<ul>\n<li><strong>You changed a post or page slug.<\/strong> The moment you edit a published permalink and hit update, the old URL is dead. Every existing link to it \u2014 from your own older posts, from other sites, from someone&#8217;s bookmarks \u2014 now points at a 404. WordPress does have some built-in guessing for old slugs, but it&#8217;s inconsistent and not something to rely on.<\/li>\n<li><strong>You deleted or merged a post.<\/strong> If you&#8217;ve folded three thin posts into one comprehensive guide, all three old URLs should redirect to the new one. Deleting content without redirecting throws away every link and every bit of ranking those pages had earned.<\/li>\n<li><strong>You moved domains or switched to HTTPS.<\/strong> A domain move means every URL on the old host needs to point at its equivalent on the new one. Same for <code>http:\/\/<\/code> to <code>https:\/\/<\/code>, or the www \/ non-www decision \u2014 pick one canonical form and redirect the other.<\/li>\n<li><strong>You&#8217;re consolidating duplicate content.<\/strong> Two URLs serving nearly the same thing split their own signals and confuse crawlers. Pick the stronger one, redirect the weaker one into it. (A <a href=\"https:\/\/jnkplugins.com\/blog\/wordpress-content-audit\/\">content audit<\/a> is usually what surfaces these in the first place.)<\/li>\n<\/ul>\n<p>The common thread: a redirect exists so that a URL somebody else controls a link to doesn&#8217;t stop working just because you reorganised things on your end.<\/p>\n<h2>Redirect types: which status code to use<\/h2>\n<p>The number matters. Search engines read it as a statement of intent, and picking the wrong one either loses you ranking signals or tells Google to keep the old URL indexed indefinitely.<\/p>\n<table>\n<thead>\n<tr>\n<th>Code<\/th>\n<th>Name<\/th>\n<th>Meaning<\/th>\n<th>Use it when<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>301<\/code><\/td>\n<td>Moved Permanently<\/td>\n<td>This URL has moved for good. Search engines drop the old URL from the index over time and pass ranking signals to the new one.<\/td>\n<td>Renamed slugs, merged posts, domain moves, HTTPS migrations \u2014 the default for 95% of cases.<\/td>\n<\/tr>\n<tr>\n<td><code>302<\/code><\/td>\n<td>Found (temporary)<\/td>\n<td>The content lives elsewhere for now, but the original URL is coming back. Google keeps indexing the original.<\/td>\n<td>Genuinely temporary situations only \u2014 an A\/B test, a seasonal landing page, a page down for maintenance.<\/td>\n<\/tr>\n<tr>\n<td><code>307<\/code><\/td>\n<td>Temporary Redirect<\/td>\n<td>The strict HTTP\/1.1 version of a 302: the request method and body must be preserved (a <code>POST<\/code> stays a <code>POST<\/code>).<\/td>\n<td>Temporary redirects where the method matters \u2014 form submissions, APIs. Also what HSTS preloading issues internally.<\/td>\n<\/tr>\n<tr>\n<td><code>308<\/code><\/td>\n<td>Permanent Redirect<\/td>\n<td>Like a 301, but the method must be preserved too. Google treats it as equivalent to a 301 for ranking purposes.<\/td>\n<td>Permanent moves where non-<code>GET<\/code> requests need to survive the hop. Rare on a content site.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>In practice: <strong>use 301 unless the move is genuinely temporary.<\/strong> The old myth that a 301 &#8220;leaks&#8221; some percentage of link equity has been retired \u2014 Google has said for years that PageRank is passed through 301s and 302s without loss. What a 302 does cost you is clarity: you&#8217;re telling search engines to keep the <em>old<\/em> URL as the canonical one, which is exactly wrong if the move is permanent.<\/p>\n<blockquote><p>If you leave a permanent move on a 302 for months, Google may eventually work out your real intent and treat it as permanent anyway \u2014 but you&#8217;ve spent that whole time with ambiguous signals for no reason. Set the correct code the first time.<\/p><\/blockquote>\n<h2>Method 1: A redirect plugin (easiest)<\/h2>\n<p>For most people this is the right answer, and there&#8217;s no shame in it. A dedicated redirect plugin \u2014 Redirection is the long-standing free one, and most major SEO plugins include a redirects module in their premium tier \u2014 gives you a form: paste the old path, paste the new URL, choose the status code, save.<\/p>\n<p>What you get beyond convenience:<\/p>\n<ol>\n<li><strong>A 404 log.<\/strong> The plugin records URLs people (and crawlers) requested that didn&#8217;t exist. That log is a to-do list of redirects you didn&#8217;t know you needed \u2014 far more useful than guessing.<\/li>\n<li><strong>Automatic slug redirects.<\/strong> Most of these plugins offer to create a 301 automatically whenever you change a published post&#8217;s permalink. Turn this on. It eliminates the single most common source of internal 404s.<\/li>\n<li><strong>No server access needed.<\/strong> Works identically on shared hosting, managed WordPress, Apache, or nginx.<\/li>\n<\/ol>\n<p>The honest trade-off is performance: plugin redirects are handled by PHP, so each one costs a WordPress bootstrap. For a few hundred redirects on a normal site that&#8217;s irrelevant. For tens of thousands, or for site-wide domain moves, do it at the server level instead.<\/p>\n<h2>Method 2: Server config (.htaccess or nginx)<\/h2>\n<p>Server-level redirects are the fastest possible option because they resolve before PHP ever loads. They&#8217;re also the least forgiving \u2014 a syntax error can take the whole site down, so <strong>back up the file before you touch it<\/strong>.<\/p>\n<h3>Apache (.htaccess)<\/h3>\n<p>Edit the <code>.htaccess<\/code> file in your WordPress root. Put your rules <em>above<\/em> the <code># BEGIN WordPress<\/code> block, because WordPress rewrites that section and will wipe anything inside it.<\/p>\n<p>The simplest form uses <code>mod_alias<\/code>:<\/p>\n<p><code>Redirect 301 \/old-post-slug\/ https:\/\/example.com\/new-post-slug\/<\/code><\/p>\n<p>Note that the first argument is a path and the second is a full URL. One gotcha: <code>Redirect<\/code> matches by prefix, so a rule for <code>\/blog<\/code> also catches <code>\/blog-archive<\/code>. Use <code>RedirectMatch<\/code> with an anchored pattern, or <code>mod_rewrite<\/code>, when you need precision:<\/p>\n<p><code>RewriteRule ^old-post-slug\/?$ \/new-post-slug\/ [R=301,L]<\/code><\/p>\n<p>That belongs inside an <code>&lt;IfModule mod_rewrite.c&gt;<\/code> block with <code>RewriteEngine On<\/code> already set. The <code>R=301<\/code> flag sets the status code; <code>L<\/code> stops rule processing there.<\/p>\n<h3>nginx<\/h3>\n<p>nginx doesn&#8217;t read <code>.htaccess<\/code> at all \u2014 rules go in your server block and require a reload (<code>nginx -s reload<\/code>) to take effect. The equivalents:<\/p>\n<p><code>location = \/old-post-slug\/ { return 301 https:\/\/example.com\/new-post-slug\/; }<\/code><\/p>\n<p>Or for a pattern with a capture: <code>rewrite ^\/blog\/(.*)$ \/articles\/$1 permanent;<\/code> \u2014 where <code>permanent<\/code> means 301 and <code>redirect<\/code> means 302.<\/p>\n<p>If you&#8217;re on managed WordPress hosting you probably can&#8217;t edit nginx config directly; most hosts expose a redirects panel instead, which writes the same rules for you.<\/p>\n<h2>Method 3: PHP via functions.php<\/h2>\n<p>Sometimes a redirect depends on something only WordPress knows \u2014 the user&#8217;s role, whether a product is out of stock, a query parameter. That&#8217;s when you drop to PHP. Hook <code>template_redirect<\/code>, which fires after the query is resolved but before any output:<\/p>\n<p><code>add_action( 'template_redirect', function () { if ( is_page( 'old-page' ) ) { wp_safe_redirect( home_url( '\/new-page\/' ), 301 ); exit; } } );<\/code><\/p>\n<p>Three things to get right. Use <code>wp_safe_redirect()<\/code> rather than <code>wp_redirect()<\/code> when any part of the destination could come from user input \u2014 it restricts redirects to your own host. Always call <code>exit;<\/code> immediately after; without it, WordPress carries on rendering the page. And pass the status code explicitly, because <code>wp_redirect()<\/code> defaults to <code>302<\/code>, which is not what you want for a permanent move.<\/p>\n<p>Use this method <strong>sparingly<\/strong>. Code in <code>functions.php<\/code> runs on every single request, so a growing list of hand-written conditionals becomes a real tax on page generation and a maintenance burden nobody but you understands. If the rule is &#8220;old URL goes to new URL&#8221;, it belongs in a plugin or the server config. Reserve PHP for logic that genuinely needs to be conditional.<\/p>\n<h2>Common mistakes<\/h2>\n<h3>Redirect chains and loops<\/h3>\n<p>A chain is A \u2192 B \u2192 C. Each hop adds latency for the visitor, and Google follows only a limited number of hops before giving up. Chains build up quietly over years of restructuring. The fix is to flatten them: point A directly at C and retire the middle rule. A <strong>loop<\/strong> (A \u2192 B \u2192 A) is worse \u2014 the browser gives up with an error and the page is simply unreachable. Loops usually come from two rules in different places, like an .htaccess rule fighting a plugin rule, so check both before adding a third.<\/p>\n<h3>Redirecting everything to the homepage<\/h3>\n<p>The lazy fix for a batch of 404s is a catch-all rule sending them all to <code>\/<\/code>. Don&#8217;t. Google explicitly treats irrelevant mass redirects as <strong>soft 404s<\/strong> \u2014 the destination doesn&#8217;t answer the request, so it&#8217;s a dead end with extra steps \u2014 and users find it disorienting to click a specific link and land on a generic homepage. Redirect each URL to its closest genuine equivalent. If nothing equivalent exists, let it return a clean <code>404<\/code> (or <code>410 Gone<\/code> if it&#8217;s deliberate and permanent). A real 404 is a perfectly valid answer.<\/p>\n<h3>Leaving your internal links pointing at the old URL<\/h3>\n<p>This is the one almost everyone skips. A redirect is a safety net for links you <em>can&#8217;t<\/em> change \u2014 other people&#8217;s sites, bookmarks, old emails. It isn&#8217;t a fix for links inside your own content, which you control and should simply update to the new URL, so readers and crawlers get there in one hop instead of two. Finding them all by hand is the tedious part; a linking tool with a bulk URL-change or broken-internal-link report does it in one pass \u2014 our own <a href=\"https:\/\/jnkplugins.com\/jnk-linkweave\/\">JnK Linkweave<\/a> (disclosure: it&#8217;s ours, core is free) includes that report, and any tool that indexes your internal links will do the job. Either way, the same audit that <a href=\"https:\/\/jnkplugins.com\/blog\/find-fix-broken-links-wordpress\/\">finds broken links<\/a> will surface the stale internal ones.<\/p>\n<h3>Not testing<\/h3>\n<p>A redirect you didn&#8217;t verify is a guess. Test every one, and test it in a way that shows you the actual status code.<\/p>\n<h2>How to test a redirect<\/h2>\n<p>Two reliable methods, both free.<\/p>\n<ol>\n<li><strong>curl from a terminal.<\/strong> Run <code>curl -I https:\/\/example.com\/old-url\/<\/code>. The <code>-I<\/code> fetches headers only. You want to see the status line (<code>HTTP\/2 301<\/code>) and a <code>location:<\/code> header holding the new URL. To follow the whole chain and count the hops, use <code>curl -ILs https:\/\/example.com\/old-url\/<\/code> \u2014 every 301 or 302 printed before the final <code>200<\/code> is one hop. More than one means you have a chain to flatten.<\/li>\n<li><strong>Browser dev tools.<\/strong> Open the <strong>Network<\/strong> tab <em>before<\/em> loading the URL, tick &#8220;Preserve log&#8221; (otherwise the redirect entry vanishes on navigation), then load the old address. The first row shows the original request with its 3xx status; click it to see the <code>Location<\/code> response header. Each subsequent row is another hop.<\/li>\n<\/ol>\n<p>Test with your browser cache cleared or in a private window. Browsers cache 301s aggressively \u2014 that&#8217;s part of why they&#8217;re fast \u2014 which means a mistyped permanent redirect can appear to persist on your own machine long after you&#8217;ve fixed it on the server. If a redirect looks stuck, try a different browser or plain <code>curl<\/code> before assuming the rule is wrong.<\/p>\n<p>Finally, check Google Search Console a couple of weeks after any large batch. The Pages report will show whether the old URLs are being dropped and the new ones indexed \u2014 the real confirmation that a permanent move landed properly.<\/p>\n<h2>Related reading<\/h2>\n<ul>\n<li><a href=\"https:\/\/jnkplugins.com\/blog\/change-wordpress-permalink-without-losing-traffic\/\">Changing permalinks without losing traffic<\/a> \u2014 the most common reason you suddenly need redirects<\/li>\n<\/ul>\n<h2>Frequently asked questions<\/h2>\n<h3>What&#8217;s the difference between a 301 and a 302 redirect?<\/h3>\n<p>A 301 says the move is permanent: search engines drop the old URL from the index over time and pass ranking signals to the new one. A 302 says it&#8217;s temporary, so search engines keep indexing the original URL and treat the new location as a stopgap. Use a 301 for renamed slugs, merged posts, domain moves and HTTPS migrations, and reserve 302 for genuinely temporary situations like an A\/B test or a page down for maintenance.<\/p>\n<h3>Can I redirect a URL in WordPress without a plugin?<\/h3>\n<p>Yes, in two ways. On Apache you can add a rule to your .htaccess file, such as <code>Redirect 301 \/old-slug\/ https:\/\/example.com\/new-slug\/<\/code>, placed above the # BEGIN WordPress block so WordPress doesn&#8217;t overwrite it; on nginx you add a <code>return 301<\/code> or <code>rewrite ... permanent;<\/code> directive to your server block and reload. You can also redirect in PHP by hooking <code>template_redirect<\/code> and calling <code>wp_safe_redirect()<\/code> with a 301 status followed by <code>exit;<\/code>, but that code runs on every request, so keep it for cases that genuinely need conditional logic.<\/p>\n<h3>Is it bad to redirect old pages to my homepage?<\/h3>\n<p>Yes. Google treats irrelevant mass redirects to the homepage as soft 404s, because the destination doesn&#8217;t answer what the visitor asked for, and users find it disorienting to click a specific link and land on a generic page. Redirect each URL to its closest genuine equivalent instead, and if no equivalent exists, let the URL return a clean 404 \u2014 or a 410 if the removal is deliberate and permanent.<\/p>\n<p><script type=\"application\/ld+json\">\n{\n  \"@context\": \"https:\/\/schema.org\",\n  \"@type\": \"FAQPage\",\n  \"mainEntity\": [\n    {\n      \"@type\": \"Question\",\n      \"name\": \"What's the difference between a 301 and a 302 redirect?\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"A 301 says the move is permanent: search engines drop the old URL from the index over time and pass ranking signals to the new one. A 302 says it's temporary, so search engines keep indexing the original URL and treat the new location as a stopgap. Use a 301 for renamed slugs, merged posts, domain moves and HTTPS migrations, and reserve 302 for genuinely temporary situations like an A\/B test or a page down for maintenance.\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"Can I redirect a URL in WordPress without a plugin?\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"Yes, in two ways. On Apache you can add a rule to your .htaccess file, such as Redirect 301 \/old-slug\/ https:\/\/example.com\/new-slug\/, placed above the # BEGIN WordPress block so WordPress doesn't overwrite it; on nginx you add a return 301 or rewrite ... permanent; directive to your server block and reload. You can also redirect in PHP by hooking template_redirect and calling wp_safe_redirect() with a 301 status followed by exit;, but that code runs on every request, so keep it for cases that genuinely need conditional logic.\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"Is it bad to redirect old pages to my homepage?\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"Yes. Google treats irrelevant mass redirects to the homepage as soft 404s, because the destination doesn't answer what the visitor asked for, and users find it disorienting to click a specific link and land on a generic page. Redirect each URL to its closest genuine equivalent instead, and if no equivalent exists, let the URL return a clean 404 \u2014 or a 410 if the removal is deliberate and permanent.\"\n      }\n    }\n  ]\n}\n<\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A redirect tells a browser \u2014 and a search engine \u2014 that the URL it just asked for now lives somewhere else. Set one up and \u2026<\/p>\n","protected":false},"author":1,"featured_media":179,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-178","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Redirect a URL in WordPress (3 Ways) - JnK Plugins Blog<\/title>\n<meta name=\"description\" content=\"Three ways to redirect a URL in WordPress \u2014 plugin, .htaccess or PHP \u2014 plus 301 vs 302, common mistakes, and how to test with curl.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/jnkplugins.com\/blog\/redirect-url-wordpress\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Redirect a URL in WordPress (3 Ways) - JnK Plugins Blog\" \/>\n<meta property=\"og:description\" content=\"Three ways to redirect a URL in WordPress \u2014 plugin, .htaccess or PHP \u2014 plus 301 vs 302, common mistakes, and how to test with curl.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jnkplugins.com\/blog\/redirect-url-wordpress\/\" \/>\n<meta property=\"og:site_name\" content=\"JnK Plugins Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-07-27T12:21:42+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-07-30T09:21:32+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/jnkplugins.com\/blog\/wp-content\/uploads\/2026\/07\/redirect-url.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Suresh K Meena\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Suresh K Meena\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"11 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/redirect-url-wordpress\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/redirect-url-wordpress\\\/\"},\"author\":{\"name\":\"Suresh K Meena\",\"@id\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/#\\\/schema\\\/person\\\/601d025989fe7e0c285dd7fff36d9feb\"},\"headline\":\"How to Redirect a URL in WordPress (3 Ways)\",\"datePublished\":\"2026-07-27T12:21:42+00:00\",\"dateModified\":\"2026-07-30T09:21:32+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/redirect-url-wordpress\\\/\"},\"wordCount\":2058,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/redirect-url-wordpress\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/redirect-url.png\",\"articleSection\":[\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/redirect-url-wordpress\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/redirect-url-wordpress\\\/\",\"url\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/redirect-url-wordpress\\\/\",\"name\":\"How to Redirect a URL in WordPress (3 Ways) - JnK Plugins Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/redirect-url-wordpress\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/redirect-url-wordpress\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/redirect-url.png\",\"datePublished\":\"2026-07-27T12:21:42+00:00\",\"dateModified\":\"2026-07-30T09:21:32+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/#\\\/schema\\\/person\\\/601d025989fe7e0c285dd7fff36d9feb\"},\"description\":\"Three ways to redirect a URL in WordPress \u2014 plugin, .htaccess or PHP \u2014 plus 301 vs 302, common mistakes, and how to test with curl.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/redirect-url-wordpress\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/redirect-url-wordpress\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/redirect-url-wordpress\\\/#primaryimage\",\"url\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/redirect-url.png\",\"contentUrl\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/redirect-url.png\",\"width\":1200,\"height\":630,\"caption\":\"Redirect a URL in WordPress \u2014 featured card\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/redirect-url-wordpress\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Redirect a URL in WordPress (3 Ways)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/\",\"name\":\"JnK Plugins Blog\",\"description\":\"Guides, comparisons, and tutorials for our WordPress plugins\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/#\\\/schema\\\/person\\\/601d025989fe7e0c285dd7fff36d9feb\",\"name\":\"Suresh K Meena\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a4697e28623a48b2ee5ce631fb355d9e2dcc08a7ffb793cc5dd2885fe53dc4b2?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a4697e28623a48b2ee5ce631fb355d9e2dcc08a7ffb793cc5dd2885fe53dc4b2?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a4697e28623a48b2ee5ce631fb355d9e2dcc08a7ffb793cc5dd2885fe53dc4b2?s=96&d=mm&r=g\",\"caption\":\"Suresh K Meena\"},\"description\":\"Suresh has been building web apps for over 15 years and is the founder of JnK Plugins, where he makes honest, no-bloat WordPress tools that keep your data in your own hands. Away from the keyboard he is usually at a chessboard, thinking a few moves ahead \u2014 and he is always ready to learn something new.\",\"sameAs\":[\"https:\\\/\\\/jnkplugins.com\"],\"url\":\"https:\\\/\\\/jnkplugins.com\\\/blog\\\/author\\\/suresh\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Redirect a URL in WordPress (3 Ways) - JnK Plugins Blog","description":"Three ways to redirect a URL in WordPress \u2014 plugin, .htaccess or PHP \u2014 plus 301 vs 302, common mistakes, and how to test with curl.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/jnkplugins.com\/blog\/redirect-url-wordpress\/","og_locale":"en_US","og_type":"article","og_title":"How to Redirect a URL in WordPress (3 Ways) - JnK Plugins Blog","og_description":"Three ways to redirect a URL in WordPress \u2014 plugin, .htaccess or PHP \u2014 plus 301 vs 302, common mistakes, and how to test with curl.","og_url":"https:\/\/jnkplugins.com\/blog\/redirect-url-wordpress\/","og_site_name":"JnK Plugins Blog","article_published_time":"2026-07-27T12:21:42+00:00","article_modified_time":"2026-07-30T09:21:32+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/jnkplugins.com\/blog\/wp-content\/uploads\/2026\/07\/redirect-url.png","type":"image\/png"}],"author":"Suresh K Meena","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Suresh K Meena","Est. reading time":"11 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jnkplugins.com\/blog\/redirect-url-wordpress\/#article","isPartOf":{"@id":"https:\/\/jnkplugins.com\/blog\/redirect-url-wordpress\/"},"author":{"name":"Suresh K Meena","@id":"https:\/\/jnkplugins.com\/blog\/#\/schema\/person\/601d025989fe7e0c285dd7fff36d9feb"},"headline":"How to Redirect a URL in WordPress (3 Ways)","datePublished":"2026-07-27T12:21:42+00:00","dateModified":"2026-07-30T09:21:32+00:00","mainEntityOfPage":{"@id":"https:\/\/jnkplugins.com\/blog\/redirect-url-wordpress\/"},"wordCount":2058,"commentCount":0,"image":{"@id":"https:\/\/jnkplugins.com\/blog\/redirect-url-wordpress\/#primaryimage"},"thumbnailUrl":"https:\/\/jnkplugins.com\/blog\/wp-content\/uploads\/2026\/07\/redirect-url.png","articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/jnkplugins.com\/blog\/redirect-url-wordpress\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/jnkplugins.com\/blog\/redirect-url-wordpress\/","url":"https:\/\/jnkplugins.com\/blog\/redirect-url-wordpress\/","name":"How to Redirect a URL in WordPress (3 Ways) - JnK Plugins Blog","isPartOf":{"@id":"https:\/\/jnkplugins.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/jnkplugins.com\/blog\/redirect-url-wordpress\/#primaryimage"},"image":{"@id":"https:\/\/jnkplugins.com\/blog\/redirect-url-wordpress\/#primaryimage"},"thumbnailUrl":"https:\/\/jnkplugins.com\/blog\/wp-content\/uploads\/2026\/07\/redirect-url.png","datePublished":"2026-07-27T12:21:42+00:00","dateModified":"2026-07-30T09:21:32+00:00","author":{"@id":"https:\/\/jnkplugins.com\/blog\/#\/schema\/person\/601d025989fe7e0c285dd7fff36d9feb"},"description":"Three ways to redirect a URL in WordPress \u2014 plugin, .htaccess or PHP \u2014 plus 301 vs 302, common mistakes, and how to test with curl.","breadcrumb":{"@id":"https:\/\/jnkplugins.com\/blog\/redirect-url-wordpress\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jnkplugins.com\/blog\/redirect-url-wordpress\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jnkplugins.com\/blog\/redirect-url-wordpress\/#primaryimage","url":"https:\/\/jnkplugins.com\/blog\/wp-content\/uploads\/2026\/07\/redirect-url.png","contentUrl":"https:\/\/jnkplugins.com\/blog\/wp-content\/uploads\/2026\/07\/redirect-url.png","width":1200,"height":630,"caption":"Redirect a URL in WordPress \u2014 featured card"},{"@type":"BreadcrumbList","@id":"https:\/\/jnkplugins.com\/blog\/redirect-url-wordpress\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/jnkplugins.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Redirect a URL in WordPress (3 Ways)"}]},{"@type":"WebSite","@id":"https:\/\/jnkplugins.com\/blog\/#website","url":"https:\/\/jnkplugins.com\/blog\/","name":"JnK Plugins Blog","description":"Guides, comparisons, and tutorials for our WordPress plugins","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/jnkplugins.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/jnkplugins.com\/blog\/#\/schema\/person\/601d025989fe7e0c285dd7fff36d9feb","name":"Suresh K Meena","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/a4697e28623a48b2ee5ce631fb355d9e2dcc08a7ffb793cc5dd2885fe53dc4b2?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/a4697e28623a48b2ee5ce631fb355d9e2dcc08a7ffb793cc5dd2885fe53dc4b2?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a4697e28623a48b2ee5ce631fb355d9e2dcc08a7ffb793cc5dd2885fe53dc4b2?s=96&d=mm&r=g","caption":"Suresh K Meena"},"description":"Suresh has been building web apps for over 15 years and is the founder of JnK Plugins, where he makes honest, no-bloat WordPress tools that keep your data in your own hands. Away from the keyboard he is usually at a chessboard, thinking a few moves ahead \u2014 and he is always ready to learn something new.","sameAs":["https:\/\/jnkplugins.com"],"url":"https:\/\/jnkplugins.com\/blog\/author\/suresh\/"}]}},"_links":{"self":[{"href":"https:\/\/jnkplugins.com\/blog\/wp-json\/wp\/v2\/posts\/178","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jnkplugins.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jnkplugins.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jnkplugins.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jnkplugins.com\/blog\/wp-json\/wp\/v2\/comments?post=178"}],"version-history":[{"count":2,"href":"https:\/\/jnkplugins.com\/blog\/wp-json\/wp\/v2\/posts\/178\/revisions"}],"predecessor-version":[{"id":271,"href":"https:\/\/jnkplugins.com\/blog\/wp-json\/wp\/v2\/posts\/178\/revisions\/271"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/jnkplugins.com\/blog\/wp-json\/wp\/v2\/media\/179"}],"wp:attachment":[{"href":"https:\/\/jnkplugins.com\/blog\/wp-json\/wp\/v2\/media?parent=178"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jnkplugins.com\/blog\/wp-json\/wp\/v2\/categories?post=178"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jnkplugins.com\/blog\/wp-json\/wp\/v2\/tags?post=178"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}