Choosing a Blog URL Structure
Today, I came across a post by codemzy which I’ve decided to respond to1. Below I list his2 issues, and below that my responses to those issues (and my thoughts). The four most common URL structures for blogs he lists are below:
The Four Blog Post URL Idioms
- Post ID only in URL
- Post date + title in URL
- Post category + title in URL
- Simpy the post title
1. Post ID only in URL
I agree. Completely stupid.
I’m not sure where those ID’s are coming from. Something like Wordpress? Random alphanumeric strings have an important place, just not in a URL. Unless it’s part of an auth process…
simonh.uk/euH0nionl7
Ugh.
2. Post date + title in URL
This is my preferred URL structure
I see no problem in having the original post date in a URL. Many bloggers / sites do this. I would suggest that the date of a post is nearly as important as the post title (and its content):
/2024/12/05/best-things-to-do-in-x-this-christmas
/2025/12/05/best-things-to-do-in-x-this-christmas
/2026/12/05/best-things-to-do-in-x-this-christmas
If a post is not so obviously tied up to an annual event (as above), it’s easy to add updates at either the top or bottom of the page to let the reader know new information has been added or removed. Or, that the whole post is now obsolete. I’ve seen that quite a few times. I believe the date of a post matters. I prefer a post that still has the original date along with comments about what has changed, over time.
3. Post category + title in URL
This is where collisions / problems can start to occur
Let’s take codemzy’s post as an example:
https://www.codemzy.com/blog/best-blog-url-structure
Maybe he’s been neglecting his blog for a while. Completely forgot that he wrote this post years ago! So he writes what he thinks is a new post. But it isn’t. It has the URL of
/blogging/best-blog-url-structure
Naturally, the first time he wrote this same post, it would have had the catergory of blogging
and the title os best-blog-url-structure
.
Oops!
4. Simply the post title
See above (same problem). But, I agree, the category doesn’t need to be part of the URL. We can figure that out that out from the post title.
We’ve now just removed one path component: the category. Stil have the same chance of collisions as the category should be the same for mulitple posts e.g. blogging
My Simple Approach
Using the codemzy example again, we can simply have two posts:
- https://www.codemzy.com/2023/05/23/best-blog-url-structure
- https://www.codemzy.com/2028/01/15/best-blog-url-structure
Or X number of posts on exactly the same subject to show that opinions / best practices have changed over time.
The search engines are pretty smart nowadays. They’ll offer the latest post. All codemzy has to do is include a note that he wrote a similar post in the past (and link to it), but has he now has different views.
Conclusion
As with all things, upfront thought can save annoyance and unwanted work in the future. And this is something any blogger should think about. By having the date as part of the URL, collisions are impossible3 so it’s one less thing to worry about.
For example, let’s say I decide to have a weekly blog series:
Things I learnt this week
which I write every Sunday. By having the date as part of the URL:
2024/12/15/things-i-leant-this-week
2024/12/22/things-i-leant-this-week
2024/12/29/things-i-leant-this-week
I’m not having to figure out how to express each week (should I use week commencing or the ISO week format)? Plus each URL is unique anyway, but for the SEO minded, I might appear to be an expert on learning things each week.
Updates
This section is for any additions, deletions or corrections that may be required.
Footnotes
1 Mainly as this was the first natural result returned. I have my own ideas on this topic, hence this post.
2 I have assumed Codemzy is male, if not please let me know by email, and I’ll correct this.
3 Unless you use exactly the same post title for two different posts on the same day. If so, no one can help you!