I recently found someone on the WordPress support forum who was asking how can he add /blog/ in front of his posts’, categories’ and tags’ URLs.

So I thought I’d write a post about it and share the solution with you guys. It’s quite easy actually.

Click here if you want to jump straight to the video tutorial.

Adding /blog/ to your posts’ URLs

Even though this is a minor and simple change, and it should work without problems, I still recommend making a backup of your website, because you never know what might go wrong.

You need to:

  • Go to Settings -> Permalinks;
  • Under Common Settings, choose Custom Structure. The default structure there would be http://yourdomain.com/%postname%/;
  • In front of /%postname%/, add /blog, so it will become http://yourdomain.com/blog/%postname%/;
  • Save changes.

Blog custom structure permalink wordpress

Now this should be it! Your posts’ URLs should begin with /blog/, like on our testing website.

/blog/ post url wordpress

Unfortunately, this change will apply to your Custom Post Types as well, so it might be a deal-breaker if you’re using that.

Adding /blog/ to your categories and tags too

The above change should work for your categories and tags too, so you shouldn’t do anything extra, but if it somehow doesn’t work, do this:

  • In the same place, Settings -> Permalinks, go to Category base and Tag base, under Optional;
  • Add this in Category base: blog/category and this in the Tag base: blog/tag;
  • Save changes.

Category and tag base in WordPress

Video Tutorial

https://youtu.be/mrYwrYO28T0



That’s a wrap

Hope you found the post useful!

Don’t forget to share it with your friends and also subscribe.

If you have any questions or thoughts, drop a comment, contact us, or message us on Facebook.


Leave a Comment