{"id":1487,"date":"2020-11-12T18:34:28","date_gmt":"2020-11-12T18:34:28","guid":{"rendered":"https:\/\/www.gmass.co\/blog\/?p=1487"},"modified":"2020-11-16T20:10:30","modified_gmt":"2020-11-16T20:10:30","slug":"should-you-let-yoast-redirect","status":"publish","type":"post","link":"https:\/\/www.gmass.co\/blog\/should-you-let-yoast-redirect\/","title":{"rendered":"Should you let Yoast handle the redirect when your slug changes?"},"content":{"rendered":"<p>Given that this blog runs on WordPress, I sometimes <strong>change the slug<\/strong> of a post to optimize it for SEO purposes. Usually, this involves shortening the slug or removing &#8220;stop&#8221; words like &#8220;the,&#8221; &#8220;and,&#8221; and &#8220;of.&#8221; If your blog is like most WordPress blogs, you have Yoast installed, and when you edit the slug in WordPress, Yoast will tell you it has created a redirect from the old URL to the new URL, and give you an option to undo it.<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/001-undo-Yoast-redirect-42kb.png\" data-rel=\"lightbox-image-0\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-14226\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/001-undo-Yoast-redirect-42kb.png\" alt=\"undo Yoast redirect\" width=\"732\" height=\"130\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/001-undo-Yoast-redirect-42kb.png 1464w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/001-undo-Yoast-redirect-42kb-300x53.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/001-undo-Yoast-redirect-42kb-768x136.png 768w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/001-undo-Yoast-redirect-42kb-1024x182.png 1024w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/001-undo-Yoast-redirect-42kb-24x4.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/001-undo-Yoast-redirect-42kb-36x6.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/001-undo-Yoast-redirect-42kb-48x9.png 48w\" sizes=\"auto, (max-width: 732px) 100vw, 732px\" \/><\/a><\/p>\n<p><strong><em>The question is: should you undo it?<\/em><\/strong><\/p>\n<p>In this case, I edited the blog post, wanting to change the URL from:<\/p>\n<pre>https:\/\/www.gmass.co\/blog\/how-to-sign-up-for-a-gmail-account\/<\/pre>\n<p>to this shorter, easier-to-remember URL:<\/p>\n<pre>https:\/\/www.gmass.co\/blog\/sign-up-gmail\/<\/pre>\n<p>It turns out, even if you choose to <em>undo<\/em> the Yoast redirect, the redirect <em>still<\/em> works.<\/p>\n<p>Why?<\/p>\n<p>Because <strong>WordPress automatically sets a redirect from an old slug to a new slug<\/strong> when you edit a post. I&#8217;m a WordPress purist, and when a plugin isn&#8217;t necessary, I avoid it. Yoast is necessary for other reasons, like being able to control the <strong>meta description,<\/strong> the <strong>title tag,<\/strong> and other social media header tags for the page, but since <strong>WordPress can inherently handle redirects<\/strong> when I edit the URL of a post, I don&#8217;t want Yoast to &#8220;interfere&#8221; with that redirect process.<\/p>\n<h2>How do you know whether Yoast or WordPress is doing the redirect?<\/h2>\n<p>It <em>used to be<\/em> that you could easily tell who was handling the redirect by using <strong>Chrome&#8217;s Developer Tools<\/strong> and looking at the exact <strong>Response Headers<\/strong> of the <strong>301 redirect<\/strong>. If you went to the <strong>Network<\/strong> tab, and looked at the request of the URL that redirects, you would see this <strong>Response Header<\/strong>:<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/002-Response-header-redirect-79kb.png\" data-rel=\"lightbox-image-1\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-14227\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/002-Response-header-redirect-79kb.png\" alt=\"Response header redirect\" width=\"523\" height=\"156\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/002-Response-header-redirect-79kb.png 744w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/002-Response-header-redirect-79kb-300x90.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/002-Response-header-redirect-79kb-24x7.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/002-Response-header-redirect-79kb-36x11.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/002-Response-header-redirect-79kb-48x14.png 48w\" sizes=\"auto, (max-width: 523px) 100vw, 523px\" \/><\/a><\/p>\n<p>Yoast <em>used to<\/em> insert the <strong>X-Redirect-By<\/strong> header and set it to &#8220;Yoast SEO Premium&#8221; to let any prying eyes know that it, and <em>not<\/em> WordPress, handled the redirect. This <strong>behavior is no longer present though<\/strong>, and now, regardless of whether Yoast or WordPress does the redirect, the Response Headers are the same, showing WordPress as the source of the redirect:<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/003-Response-headers-show-WordPress-redirect-149kb.png\" data-rel=\"lightbox-image-2\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-14228\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/003-Response-headers-show-WordPress-redirect-149kb.png\" alt=\"Response headers show WordPress redirect\" width=\"732\" height=\"636\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/003-Response-headers-show-WordPress-redirect-149kb.png 1132w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/003-Response-headers-show-WordPress-redirect-149kb-300x261.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/003-Response-headers-show-WordPress-redirect-149kb-768x668.png 768w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/003-Response-headers-show-WordPress-redirect-149kb-1024x890.png 1024w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/003-Response-headers-show-WordPress-redirect-149kb-24x21.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/003-Response-headers-show-WordPress-redirect-149kb-36x31.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/003-Response-headers-show-WordPress-redirect-149kb-48x42.png 48w\" sizes=\"auto, (max-width: 732px) 100vw, 732px\" \/><\/a><\/p>\n<p>It&#8217;s strange that the header doesn&#8217;t show what is actually causing the direct. This makes it difficult to troubleshoot redirection issues. Yoast itself has <a href=\"https:\/\/developer.yoast.com\/blog\/x-redirect-by-header\/\">proposed a standard<\/a> for this, and it&#8217;s possible that a recent WordPress core update is overriding Yoast&#8217;s ability to set this header.<\/p>\n<h2>If WordPress handles the redirects, why use the Yoast redirect feature?<\/h2>\n<p>While WordPress natively handles redirects for posts when you edited the slug, the benefit of Yoast&#8217;s redirect feature is that <strong>you can redirect any page to any other page even if it&#8217;s not related to editing a post<\/strong>.<\/p>\n<p>In my example above, I shortened my URL from https:\/\/www.gmass.co\/blog\/how-to-sign-up-for-a-gmail-account to https:\/\/www.gmass.co\/blog\/sign-up-gmail by editing the slug directly in the post. But, what if I also wanted the even shorter URL www.gmass.co\/blog\/gmail to work and also redirect to the post? How would I do that without creating a post that&#8217;s connected to it? Using the Yoast SEO redirect manager, I can add an entry such that www.gmass.co\/blog\/gmail redirects to www.gmass.co\/blog\/sign-up-gmail.<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/004-Yoast-redirect-48kb.png\" data-rel=\"lightbox-image-3\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-14229\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/004-Yoast-redirect-48kb.png\" alt=\"Yoast redirect\" width=\"732\" height=\"171\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/004-Yoast-redirect-48kb.png 2160w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/004-Yoast-redirect-48kb-300x70.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/004-Yoast-redirect-48kb-768x179.png 768w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/004-Yoast-redirect-48kb-1024x239.png 1024w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/004-Yoast-redirect-48kb-24x6.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/004-Yoast-redirect-48kb-36x8.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/004-Yoast-redirect-48kb-48x11.png 48w\" sizes=\"auto, (max-width: 732px) 100vw, 732px\" \/><\/a><\/p>\n<p>The &#8220;old&#8221; URL is \/blog\/gmail but it really isn&#8217;t &#8220;old&#8221; because it never existed to begin with.<\/p>\n<p>Also, note that the &#8220;New URL&#8221; doesn&#8217;t contain the &#8220;\/blog\/&#8221; designation. Normally it would, but my WordPress setup is a little differently because in my general settings, I have the WordPress install and site directory set to the same path, so Yoast adds the &#8220;\/blog\/&#8221; part automatically to whatever I enter. If I were to specify \/blog\/sign-up-gmail then it would actually redirect to \/blog\/blog\/sign-up-gmail which, obviously, I don&#8217;t want.<\/p>\n<p>So <strong>one benefit of using the Yoast redirect feature<\/strong> is that I can <strong>set a redirect rule without being connected to a particular post<\/strong>. In this case, I&#8217;m redirecting the &#8220;gmail&#8221; slug to an actual post, but if I wanted, I could also redirect it to the Gmail website itself.<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/005-redirecting-to-a-website-114kb.png\" data-rel=\"lightbox-image-4\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-14231\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/005-redirecting-to-a-website-114kb.png\" alt=\"redirecting to a website\" width=\"731\" height=\"360\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/005-redirecting-to-a-website-114kb.png 1728w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/005-redirecting-to-a-website-114kb-300x148.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/005-redirecting-to-a-website-114kb-768x379.png 768w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/005-redirecting-to-a-website-114kb-1024x505.png 1024w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/005-redirecting-to-a-website-114kb-24x12.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/005-redirecting-to-a-website-114kb-36x18.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/005-redirecting-to-a-website-114kb-48x24.png 48w\" sizes=\"auto, (max-width: 731px) 100vw, 731px\" \/><\/a><\/p>\n<p>The <strong>second benefit<\/strong> of the Yoast redirect feature is <strong>redirecting deleted posts<\/strong>. WordPress <strong>does not natively handle redirects for deleted posts<\/strong>. If you decide to delete a post but you want its URL to redirect because the post&#8217;s URL has been published on the Internet or included in emails, then you <em>have<\/em> to use a plugin like Yoast. If you don&#8217;t use a redirect plugin, WordPress will return a <strong>404 (Not found) page<\/strong> once you move a post to the <strong>Trash<\/strong>.<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/006-no-redirect-results-in-404-error-53kb.png\" data-rel=\"lightbox-image-5\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-14232\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/006-no-redirect-results-in-404-error-53kb.png\" alt=\"no redirect results in 404 error\" width=\"730\" height=\"243\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/006-no-redirect-results-in-404-error-53kb.png 1224w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/006-no-redirect-results-in-404-error-53kb-300x100.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/006-no-redirect-results-in-404-error-53kb-768x256.png 768w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/006-no-redirect-results-in-404-error-53kb-1024x341.png 1024w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/006-no-redirect-results-in-404-error-53kb-24x8.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/006-no-redirect-results-in-404-error-53kb-36x12.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/006-no-redirect-results-in-404-error-53kb-48x16.png 48w\" sizes=\"auto, (max-width: 730px) 100vw, 730px\" \/><\/a><\/p>\n<p>If you&#8217;re using Yoast, when you <strong>delete a post<\/strong>, you&#8217;ll be asked if you want it to redirect it elsewhere, and if you choose to do so, that redirect entry will be added to the main Yoast redirect page.<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/007-redirect-deleted-post-43kb.png\" data-rel=\"lightbox-image-6\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-14233\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/007-redirect-deleted-post-43kb.png\" alt=\"redirect deleted post\" width=\"733\" height=\"186\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/007-redirect-deleted-post-43kb.png 1464w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/007-redirect-deleted-post-43kb-300x76.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/007-redirect-deleted-post-43kb-768x195.png 768w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/007-redirect-deleted-post-43kb-1024x260.png 1024w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/007-redirect-deleted-post-43kb-24x6.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/007-redirect-deleted-post-43kb-36x9.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/007-redirect-deleted-post-43kb-48x12.png 48w\" sizes=\"auto, (max-width: 733px) 100vw, 733px\" \/><\/a><\/p>\n<h2>Which takes priority, Yoast or WordPress redirects?<\/h2>\n<p>If you edit a post&#8217;s slug, and you don&#8217;t undo the Yoast redirect that is created, then a setting will go into the database for both WordPress and Yoast to redirect the URL. Yoast, however, operates on top of WordPress and its setting takes priority over the natural WordPress setting. So if a Yoast redirect exists, it&#8217;s Yoast that does the redirecting. If, however, later delete the redirect from the Yoast Redirect Manager, the redirect will STILL work, because the natural WordPress redirect setting still exists. This can be tested easily by manipulating the database.<\/p>\n<h2>Where in the database are WordPress redirects stored?<\/h2>\n<p>WordPress creates a row in the table <strong>wp_postmeta<\/strong> tied to the post&#8217;s ID value that saves any old slugs for the post, so that those can be identified and redirected when called from the browser. In my example above, the post&#8217;s ID is 14197, so if I run this MySQL query:<\/p>\n<pre>select * from wp_postmeta where post_id = 14197<\/pre>\n<p>I&#8217;ll see this:<\/p>\n<p><a href=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/008-MySQL-query-for-wp_postmeta-478kb.png\" data-rel=\"lightbox-image-7\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-14235\" src=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/008-MySQL-query-for-wp_postmeta-478kb.png\" alt=\"MySQL query for wp_postmeta\" width=\"730\" height=\"375\" srcset=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/008-MySQL-query-for-wp_postmeta-478kb.png 1440w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/008-MySQL-query-for-wp_postmeta-478kb-300x154.png 300w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/008-MySQL-query-for-wp_postmeta-478kb-768x395.png 768w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/008-MySQL-query-for-wp_postmeta-478kb-1024x526.png 1024w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/008-MySQL-query-for-wp_postmeta-478kb-24x12.png 24w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/008-MySQL-query-for-wp_postmeta-478kb-36x19.png 36w, https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/008-MySQL-query-for-wp_postmeta-478kb-48x25.png 48w\" sizes=\"auto, (max-width: 730px) 100vw, 730px\" \/><\/a><\/p>\n<p>Note the &#8220;_wp_old_slug&#8221; entry. The purpose of _wp_old_slug entries is also documented by others like <a href=\"https:\/\/wordpress.stackexchange.com\/questions\/160054\/where-is-the-old-post-permalink-slug-stored\">StackExchange<\/a> and <a href=\"https:\/\/wordpress.org\/support\/topic\/using-_wp_old_slug\/\">WordPress.org<\/a>.<\/p>\n<p>You might also wonder <strong>where Yoast stores its own redirect information<\/strong>. This is a <em>mystery<\/em>. I searched my database everywhere, and I couldn&#8217;t find it. It&#8217;s possible that Yoast isn&#8217;t even using the MySQL database to store redirects. Perhaps they&#8217;re in an XML file within the Yoast folder under \/plugins\/ inside my WordPress installation. I&#8217;ll reach out to Yoast&#8217;s support and ask them, just out of curiosity, and will update this post if I find out.<\/p>\n<h2>Tips on analyzing the redirect in Chrome&#8217;s Developer Tools<\/h2>\n<ol>\n<li>Be sure Chrome <strong>isn&#8217;t caching<\/strong> the redirect, otherwise you&#8217;ll end up confused as ever. Do a <strong>hard reload<\/strong> to clear the cache.<\/li>\n<li>Be sure to check the <strong>&#8220;Preserve Log&#8221;<\/strong> option, otherwise you&#8217;ll be pulling out your hair in frustration that the network log disappears as soon as a redirect happens. You want to see all the redirect action so you know what URL you started with and what URL you ended with, and exactly how you got there.<\/li>\n<li>Each time you run the experiment, you probably want to <strong>&#8220;Clear the log&#8221;<\/strong> as well, so it&#8217;s easy to see the redirect results at the top.<\/li>\n<\/ol>\n<h2>Two Yoast Mysteries<\/h2>\n<p>It&#8217;s currently a mystery to me:<\/p>\n<ol>\n<li>Why the <strong>Redirect-By<\/strong> header isn&#8217;t set to Yoast when Yoast, not WordPress, is responsible for the redirect.<\/li>\n<li>Where in the WordPress MySQL database the Yoast redirects are stored. The WordPress redirects are stored in <strong>wp_postmeta<\/strong>.<\/li>\n<\/ol>\n<h2>Other redirect plugins<\/h2>\n<p>Yoast isn&#8217;t the only WordPress plugin that provides redirect functionality. There are others too, like <a href=\"https:\/\/wordpress.org\/plugins\/redirection\/\">Redirection<\/a> and <a href=\"https:\/\/wordpress.org\/plugins\/eps-301-redirects\/\">301 Redirects<\/a>. If you want more options, HubSpot has published <a href=\"https:\/\/blog.hubspot.com\/website\/10-best-redirect-wordpress-plugins\">a list<\/a> of the best WordPress redirect plugins.<\/p>\n<h2>Here are my best practices<\/h2>\n<p>If I&#8217;m <strong>editing a post<\/strong> just to have a new, shorter, slug, I <strong>undo the Yoast redirect<\/strong> and <strong>let WordPress handle it naturally<\/strong>. WordPress does this in the database by adding a row to the <strong>wp_postmeta<\/strong> table.<\/p>\n<p>If I&#8217;m <strong>deleting a post<\/strong>, WordPress <strong>doesn&#8217;t have a natural redirect option<\/strong>, so I do use Yoast for that.<\/p>\n<p>If I want to <strong>create a random URL<\/strong>, not connected to a particular post, then I&#8217;ll use Yoast to handle the redirect.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Given that this blog runs on WordPress, I sometimes change the slug of a post to optimize it for SEO purposes. Usually, this involves shortening the slug or\u2026<\/p>\n","protected":false},"author":2,"featured_media":14239,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[4536],"tags":[],"class_list":["post-1487","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\r\n<title>Should you let Yoast handle the redirect when your slug changes?<\/title>\r\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\r\n<link rel=\"canonical\" href=\"https:\/\/www.gmass.co\/blog\/should-you-let-yoast-redirect\/\" \/>\r\n<meta property=\"og:locale\" content=\"en_US\" \/>\r\n<meta property=\"og:type\" content=\"article\" \/>\r\n<meta property=\"og:title\" content=\"Should you let Yoast handle the redirect when your slug changes?\" \/>\r\n<meta property=\"og:description\" content=\"Given that this blog runs on WordPress, I sometimes change the slug of a post to optimize it for SEO purposes. Usually, this involves shortening the slug or\u2026\" \/>\r\n<meta property=\"og:url\" content=\"https:\/\/www.gmass.co\/blog\/should-you-let-yoast-redirect\/\" \/>\r\n<meta property=\"og:site_name\" content=\"GMass Blog\" \/>\r\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/GmailMailMerge\/\" \/>\r\n<meta property=\"article:published_time\" content=\"2020-11-12T18:34:28+00:00\" \/>\r\n<meta property=\"article:modified_time\" content=\"2020-11-16T20:10:30+00:00\" \/>\r\n<meta property=\"og:image\" content=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/Featured-image-Yoast-redirect-v2-225kb.png\" \/>\r\n\t<meta property=\"og:image:width\" content=\"2002\" \/>\r\n\t<meta property=\"og:image:height\" content=\"934\" \/>\r\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\r\n<meta name=\"author\" content=\"Ajay Goel\" \/>\r\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\r\n<meta name=\"twitter:creator\" content=\"@PartTimeSnob\" \/>\r\n<meta name=\"twitter:site\" content=\"@GMassForGmail\" \/>\r\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ajay Goel\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\r\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/should-you-let-yoast-redirect\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/should-you-let-yoast-redirect\\\/\"},\"author\":{\"name\":\"Ajay Goel\",\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/#\\\/schema\\\/person\\\/b5fa74f8765b860701158fd77162fff8\"},\"headline\":\"Should you let Yoast handle the redirect when your slug changes?\",\"datePublished\":\"2020-11-12T18:34:28+00:00\",\"dateModified\":\"2020-11-16T20:10:30+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/should-you-let-yoast-redirect\\\/\"},\"wordCount\":1372,\"commentCount\":1,\"image\":{\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/should-you-let-yoast-redirect\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/Featured-image-Yoast-redirect-v2-225kb.png\",\"articleSection\":[\"WordPress\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.gmass.co\\\/blog\\\/should-you-let-yoast-redirect\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/should-you-let-yoast-redirect\\\/\",\"url\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/should-you-let-yoast-redirect\\\/\",\"name\":\"Should you let Yoast handle the redirect when your slug changes?\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/should-you-let-yoast-redirect\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/should-you-let-yoast-redirect\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/Featured-image-Yoast-redirect-v2-225kb.png\",\"datePublished\":\"2020-11-12T18:34:28+00:00\",\"dateModified\":\"2020-11-16T20:10:30+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/#\\\/schema\\\/person\\\/b5fa74f8765b860701158fd77162fff8\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/should-you-let-yoast-redirect\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.gmass.co\\\/blog\\\/should-you-let-yoast-redirect\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/should-you-let-yoast-redirect\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/Featured-image-Yoast-redirect-v2-225kb.png\",\"contentUrl\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/Featured-image-Yoast-redirect-v2-225kb.png\",\"width\":2002,\"height\":934,\"caption\":\"Yoast redirect\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/should-you-let-yoast-redirect\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Should you let Yoast handle the redirect when your slug changes?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/\",\"name\":\"GMass Blog\",\"description\":\"Tips and tricks for sending mail merge and mass email campaigns directly from Gmail\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/#\\\/schema\\\/person\\\/b5fa74f8765b860701158fd77162fff8\",\"name\":\"Ajay Goel\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f3a70af05bbabe47925150d5a1320540e801b78055a74da20658fc97cd0706a2?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f3a70af05bbabe47925150d5a1320540e801b78055a74da20658fc97cd0706a2?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f3a70af05bbabe47925150d5a1320540e801b78055a74da20658fc97cd0706a2?s=96&d=mm&r=g\",\"caption\":\"Ajay Goel\"},\"description\":\"Ajay is the founder of GMass and has been developing email sending software for 20 years.\",\"sameAs\":[\"https:\\\/\\\/twitter.com\\\/PartTimeSnob\",\"https:\\\/\\\/x.com\\\/PartTimeSnob\"],\"url\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/author\\\/ajay-goel\\\/\"}]}<\/script>\r\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Should you let Yoast handle the redirect when your slug changes?","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:\/\/www.gmass.co\/blog\/should-you-let-yoast-redirect\/","og_locale":"en_US","og_type":"article","og_title":"Should you let Yoast handle the redirect when your slug changes?","og_description":"Given that this blog runs on WordPress, I sometimes change the slug of a post to optimize it for SEO purposes. Usually, this involves shortening the slug or\u2026","og_url":"https:\/\/www.gmass.co\/blog\/should-you-let-yoast-redirect\/","og_site_name":"GMass Blog","article_publisher":"https:\/\/www.facebook.com\/GmailMailMerge\/","article_published_time":"2020-11-12T18:34:28+00:00","article_modified_time":"2020-11-16T20:10:30+00:00","og_image":[{"width":2002,"height":934,"url":"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/Featured-image-Yoast-redirect-v2-225kb.png","type":"image\/png"}],"author":"Ajay Goel","twitter_card":"summary_large_image","twitter_creator":"@PartTimeSnob","twitter_site":"@GMassForGmail","twitter_misc":{"Written by":"Ajay Goel","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.gmass.co\/blog\/should-you-let-yoast-redirect\/#article","isPartOf":{"@id":"https:\/\/www.gmass.co\/blog\/should-you-let-yoast-redirect\/"},"author":{"name":"Ajay Goel","@id":"https:\/\/www.gmass.co\/blog\/#\/schema\/person\/b5fa74f8765b860701158fd77162fff8"},"headline":"Should you let Yoast handle the redirect when your slug changes?","datePublished":"2020-11-12T18:34:28+00:00","dateModified":"2020-11-16T20:10:30+00:00","mainEntityOfPage":{"@id":"https:\/\/www.gmass.co\/blog\/should-you-let-yoast-redirect\/"},"wordCount":1372,"commentCount":1,"image":{"@id":"https:\/\/www.gmass.co\/blog\/should-you-let-yoast-redirect\/#primaryimage"},"thumbnailUrl":"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/Featured-image-Yoast-redirect-v2-225kb.png","articleSection":["WordPress"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.gmass.co\/blog\/should-you-let-yoast-redirect\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.gmass.co\/blog\/should-you-let-yoast-redirect\/","url":"https:\/\/www.gmass.co\/blog\/should-you-let-yoast-redirect\/","name":"Should you let Yoast handle the redirect when your slug changes?","isPartOf":{"@id":"https:\/\/www.gmass.co\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.gmass.co\/blog\/should-you-let-yoast-redirect\/#primaryimage"},"image":{"@id":"https:\/\/www.gmass.co\/blog\/should-you-let-yoast-redirect\/#primaryimage"},"thumbnailUrl":"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/Featured-image-Yoast-redirect-v2-225kb.png","datePublished":"2020-11-12T18:34:28+00:00","dateModified":"2020-11-16T20:10:30+00:00","author":{"@id":"https:\/\/www.gmass.co\/blog\/#\/schema\/person\/b5fa74f8765b860701158fd77162fff8"},"breadcrumb":{"@id":"https:\/\/www.gmass.co\/blog\/should-you-let-yoast-redirect\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.gmass.co\/blog\/should-you-let-yoast-redirect\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.gmass.co\/blog\/should-you-let-yoast-redirect\/#primaryimage","url":"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/Featured-image-Yoast-redirect-v2-225kb.png","contentUrl":"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/11\/Featured-image-Yoast-redirect-v2-225kb.png","width":2002,"height":934,"caption":"Yoast redirect"},{"@type":"BreadcrumbList","@id":"https:\/\/www.gmass.co\/blog\/should-you-let-yoast-redirect\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.gmass.co\/blog\/"},{"@type":"ListItem","position":2,"name":"Should you let Yoast handle the redirect when your slug changes?"}]},{"@type":"WebSite","@id":"https:\/\/www.gmass.co\/blog\/#website","url":"https:\/\/www.gmass.co\/blog\/","name":"GMass Blog","description":"Tips and tricks for sending mail merge and mass email campaigns directly from Gmail","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.gmass.co\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.gmass.co\/blog\/#\/schema\/person\/b5fa74f8765b860701158fd77162fff8","name":"Ajay Goel","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/f3a70af05bbabe47925150d5a1320540e801b78055a74da20658fc97cd0706a2?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/f3a70af05bbabe47925150d5a1320540e801b78055a74da20658fc97cd0706a2?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f3a70af05bbabe47925150d5a1320540e801b78055a74da20658fc97cd0706a2?s=96&d=mm&r=g","caption":"Ajay Goel"},"description":"Ajay is the founder of GMass and has been developing email sending software for 20 years.","sameAs":["https:\/\/twitter.com\/PartTimeSnob","https:\/\/x.com\/PartTimeSnob"],"url":"https:\/\/www.gmass.co\/blog\/author\/ajay-goel\/"}]}},"_links":{"self":[{"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/posts\/1487","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/comments?post=1487"}],"version-history":[{"count":24,"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/posts\/1487\/revisions"}],"predecessor-version":[{"id":14236,"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/posts\/1487\/revisions\/14236"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/media\/14239"}],"wp:attachment":[{"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/media?parent=1487"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/categories?post=1487"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/tags?post=1487"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}