Notice: There is no legacy documentation available for this item, so you are seeing the current documentation.
Did you know that All in One SEO can automatically create redirects when you change the slug for your content?
Having All in One SEO detect when a slug is changed is very useful because it means that you shouldn’t end up with broken links.
In This Article
What is a Post Slug?
The slug is the part of the URL for your content that refers to that post or page.
For example, the URL for this article is https://aioseo.com/automatic-redirects-when-changing-the-post-slug/ which means the slug is:
WordPress automatically creates the slug when you draft a new post or page and add a title. You can change the slug at any time, but if you do it after you’ve published your content then it could break links to the post or page.
The Redirection Manager feature is available to customers with a Pro plan or above for All in One SEO Pro.
How to Edit the Post Slug
Below you can see the URL Slug field for the Hello world post in the Block editor:
Adding a Redirect When You Change the Post Slug
When you change the slug for your post or page (or any other post types), All in One SEO will display a notice asking if you want to add a redirect.
Click the Add Redirect to Improve SEO button to open the Add a Redirect popup.
The Source URL and Target URL fields will be prepopulated for you.
Setting the Redirect Type
In the Redirect Type drop down, select the type of redirect you want. The two most common are:
- 301 Moved Permanently: Use this if you want to permanently redirect the old URL because the URL has permanently changed.
- 307 Temporary Redirect: Use this if you only want to temporarily redirect the old URL.
Click the Add Redirect button to add your redirect.
Clicking on the Advanced Settings link will display the Custom Rules setting. You can learn about using Custom Rules here.
Once a redirect has been added, you can edit it by going to Redirects in the All in One SEO menu.
That’s all! You’ve successfully added a redirect so that you don’t get broken links when you change the slug of your post or page.
Check out more documentation on our Redirection Manager here.