Sometimes it is useful to separate your pages URL from blog posts,specially if you are using Google Analytics and want to group your content using the URL extraction method.
To add /blog/ to your URL is very easy, but if you have not done it from the beginning, all the URL’s will break and you will have to set up Redirect 301 on all of them. This can be a lot of work depending on how much content you have created.
But, let’s do this in steps,
Add /blog/ to your blog posts URL
It is very simple to add /blog/ to your posts URL, you only need to navigate to Settings > Permalinks:
and add /blog/ to the custom permalink setting:
This will change the URL of your blog posts but not of your pages.
Now you will have to take care of all the broken URL’s and redirect to the new URL:
Redirect to new URL after changing permalinks
Here is a great tutorial on how to do redirects in wordpress.
And you are done!
This will add /blog/ to custom post types as well.
LikeLike
Yes, it will.
/Ruth
LikeLike
This will add /blog to all post types.. probably not recommended if a site is already established with some CPT or even normal pages.
LikeLike
Yes, it does. Thanks for pointing that out.
/Ruth
LikeLike