I've tried and tested a few different blog URL structures over the years. Some had the date in (🤮), and others had the category (🫤), but I've finally found a structure I am happy with. And I think that simple is best.
There are a few common choices with how your URLs can look, so let's look at the contenders:
🗑️ URL with post id (worst)
/blog/hfrh7487fh49f/hf748whf3hfw98h39whf
🗓️ URL with the post date (not great)
/blog/2023-05-09/a-really-great-blog-post
🔖 URL with the category (better)
/blog/category/a-really-great-blog-post
🏆 Simple URL (best)
/blog/a-really-great-blog-post
If you have total control over your URL structure, I think simple is best. /blog/blog-post
. It gives you a short, readable URL, and avoids most of the downsides with the other structures.
I use this structure on my blog, and my blog builder, and I've been really happy with it.
But before we discuss why - a quick warning. If you are already using one of the other structures on an active blog, don't just suddenly make changes. It may hurt your SEO if search engines suddenly can't find your posts. If you really did want to change, you'd want to move cautiously and make sure you have redirects in place.
Let's look at the pros and cons of each blog URL structure.
URL with the post ID
I'm not going to come up with any pros to this structure. I mean, just look at it...
/blog/hfrh7487fh49f/hf748whf3hfw98h39whf
I think it's fair to say, this is not a good URL structure for a blog post.
You share that link and it's not exactly enticing. People won't know what it is! Could be a blog about rocket science or a blog about sandwiches.
And since people can't tell what it is, unless you have a trustworthy domain that a visitor already knows, they will be far less likely to click.
So, yeah, I can't see any pros here.
URL with date
Some pretty popular blogs have this structure, and it definitely used to be more common. I don't see it so much any more.
/blog/2023-05-09/a-really-great-blog-post
It's not a structure I like for one main reason. I update my blog posts! And you probably will too.
So what do you do when you update the post? Leaving the URL the same is best if the post is already ranking in search engines, and if people have already shared the URL.
But then the URL is giving the wrong information. And over time, if you just look at the URL, the post looks old.
Say you originally wrote the post in 2015, but you updated it in 2023. From the URL, people will still think it was written in 2015. They might be looking for something more up-to-date, and dismiss your post without even clicking the link to find out you updated it - because they assume from the URL it's dated 2015.
And the only other option to fix that (if you have dates in your URL), is to update the URL each time you update the post. But you don't want to be setting up a redirect each time you update a blog post.
So, I avoid this blog URL structure too.
URL with category
Ok, this I can live with.
/blog/category-name/a-really-great-blog-post
A blog post URL with the category in the structure has a few benefits.
- It makes it very clear what topic the post is about
- Indicates you might have a cluster of content on that topic
- Shows your content is organised into categories
I have a blog with the structure and I'm not about to rush and change it. But, I have noticed a few drawbacks - which is why any new blogs I create don't follow this structure anymore.
Firstly, it only works if you have one category for each post. If you use tags instead, or if any of your posts might fit into multiple categories - well, it won't work. You'll have to compromise and pick one category (at least for the URL).
And, it doesn't give you much flexibility if you want to make category changes in the future.
For example, I have a category on this blog called code
. But I'm considering breaking that down into multiple categories like ReactJS
, JavaScript
, Regex
, etc.
If all my code posts had the structure https://www.codemzy.com/blog/code/the-post-path
, then I'd have to create new URLs for the new categories, and 301
redirect all the old paths.
That's ok if you only have a few posts, but on bigger blogs with thousands of posts - that's a bit of work. Not to mention the SEO hit while search engines re-index your new URLs.
That blog that has this structure? I'm not going to be changing the categories unless I really have to. And so it does feel like you are kind of boxed in.
Simple URL
Now that I've discussed the other options, it should be pretty clear why I prefer and simple (and minimal) URL structure for my blog posts.
/blog/a-really-great-blog-post
No date, no category, no random IDs. Just /blog
+ /the-post-name
.
And it's great because if I update the blog post, I don't need to worry about the URL having the wrong date.
If I change my categories around, sure, some of the category pages would change, but each blog post will still have the same URL. Any links from other sites, and search engine indexing, will still be intact.
And as a bonus, the links are as short as they can be, so easier to read and remember.