URLs are a fantastic paradox. People pay millions to own them, yet most sites are found through Google or social networks. If you don't believe me, here are the trends for people searching Google for www.youtube.com:
People typed "www.youtube.com" into Google instead of just going directly to the website, which is a silly example but demonstrates how vital URLs are. People know and memorize them, so it's essential to have a proper URL strategy for your website.
Change the Category
Wordpress provides categories, a fantastic feature that allows grouping of similar topics. You can even add them to menus for quick access to posts. You can see this in action when you click, for example, on "Opinion."
I've shown in how to hide the ugly "Category: Options" that some Themes present in the navigation, and also how to change the title of the category to something more beautiful than "Opinion Category," so now we need to change the URL to match the previous changes.
If we name the "Category" something like "Area," we want that same name to show up in the URL, like "www.manueltgomes.com/area/privacy," keeping the site's URL structure beautiful and consistent. You can apply the same strategy for tags if you use them.
To do this:
- Log in with an account that has Administrator privileges
- Go to "Settings"
- Go to "Permalinks"
- Add the description that you want to use for the "Category base" and "Tag base."
You'll get friendly URLs like this:
That's it. Quick and simple!
Mind the Old URLs
Here's the catch. The moment you save your new category base, every existing category URL on your site stops working. Search engines, bookmarks, and links from other sites will all hit a 404.
Before you change the category base on an established site, set up 301 redirects from the old URLs to the new ones. The free Redirection plugin handles this nicely, and Yoast SEO does it too.
If your site is brand new with little traffic, this is much less of a worry. Change away.
Changing One Category Only
The Permalinks setting changes the base for every category. If you only want to change one category's slug (say, rename "tips" to "guides"), you don't need to touch Permalinks at all.
Go to "Posts" then "Categories," hover over the category, click "Edit," and change the "Slug" field. Save, and you're done. The base stays the same for every other category.
Removing the Category Base Entirely
Some site owners prefer no base at all, so the URL reads /privacy/ instead of /area/privacy/. WordPress core won't let you set an empty base, but a couple of plugins will:
- Yoast SEO has a "Strip the category base" toggle in its advanced settings
- Permalink Manager Lite gives you full control over each category's URL
This is a more aggressive change, so the redirect warning above applies, only more so. Test it on a staging site first.
When the URL Doesn't Update
If you save your changes and the new URLs still don't seem to work, visit "Settings" then "Permalinks" once more and click "Save" without changing anything. This forces WordPress to flush its rewrite rules and pick up the new structure. Nine times out of ten, that's all it takes.
Final Thoughts
A clean URL structure is one of those small details that quietly pays off over time. Renaming your category base takes thirty seconds, but it makes every link on your site read a little more naturally. Just remember the redirects if you're working on an established site, and you're set.
Photo by Ivars Krutainis on Unsplash
No comments yet
Be the first to share your thoughts on this article!