Keeping your blog active and relevant is quite a task. Thus, you may often need to disable some posts or update URLs. But here is the twist: your customers will get 404 error pages if you don't redirect customers from the old URLs. Needless to say, it harms both the user experience and your SEO efforts.
Thus, you must create 301 redirects to ensure a smooth ride. Today, you'll find out how to create automatic blog URL redirects in the
extension.
Post Contents [hide]
Auto Redirects for Deleted/Disabled Entities
In the Magento 2 Blog, the 301 redirects for deleted or disabled blog entities are created automatically. You get this functionality out of the box and don't have to take any extra steps to set it up manually.
The readers are redirected in the following way:
- Blog author > blog index page
- Blog tag > blog index page
- Blog post > blog index page
Auto Redirects for Changed Blog URLs
When you change some blog entity URL, the process of creating an automatic redirect is slightly different.
What you need to do is go to Content > Blog and choose the corresponding post, category, or tag you want to create a redirect for. Then, scroll down to the Search Engine Optimization section and start editing the URL. Then just check the Create Permanent Redirect for old URL box.
Note: you need to change the URL Key first and after that the redirect checkbox will be active.
Just like that, the blog URL redirect will be created automatically. There are no other steps to take.
Create Blog Redirects Manually
Since Magefan's blog is compatible with the Magento redirect functionality you can create redirects manually as well.
To create a blog redirect manually in Magento, go to Marketing > URL Rewrites and Add a new URL Rewrite.
Fill out all the necessary fields, and specify the old and new URLs in the Request/Target Path fields respectively.
Don't forget to press the Save button once you finish.
And that would be it. Now you have a better understanding of the Magento blog URL redirects. So, you can eliminate the 404 error pages in your blog and ensure your readers get a seamless experience.
However, you might also need to review the URL structure of your blog to have the SEO aspect fully covered.