Hi All, I’m building my own blog and article website with Ruby at the moment, and one of the smaller details I’ve having trouble deciding on is what URL structure to use. I’ve so far decided to not differentiate an article to a blog post as far as the URL goes, though they may be displayed differently in the interface. The main question I’m faced with is whether to include a date in the url, like /2012/01/some-blog-post, or whether to just go with /some-blog-post.
The thing I like about including the date is that it differentiates the URL from otherwise static content like the /contact or /about page which are easily distinguishable from articles and blog posts. The thing I don’t quite like about the date being in the URL however, is that it can devalue the content. An article might be 3 years old, but it may have been updated many times, and the content may be timeless. I’m therefore thinking that maybe I could get the best of articles by doing something like /show/some-blog-post.
Now I’m thinking that maybe it’s appropriate to give blog posts a date format, as blog posts are normally only relevant to a point-in-time, but keep articles at the root, so /2012/01/some-blog-post and /some-article. That way, I can potentially make static pages out of articles, which I can mark as being hidden from the article and post index.
So many options. Simply writing this post has been helpful. Feel free to leave an opinion on the topic.
A few thoughts:
If you go for website.com/2012/01/article-title then you should have monthly and annual index pages at website.com/2012/01/ and website.com/2012/, otherwise you’re using the URL format improperly.
Unless you are likely to want to repeat article titles, I see little merit in dating the URL. It’s just more scope for confusion, more scope for people to mis-type, and for what benefit?
If you want to distinguish between your main site content and your blog, how about website.com/blog/article-title ?
Personally, I don’t think it’s all that useful to provide that level if information in a URL. I doubt if many potential visitors would look closely at the URL, and figure out that the numbers are a date. Even if they did, I don’t think it would influence their decision to visit the page.
Also, given that the URL might contribute (slightly) to the value of the page for search engine purposes, it would make sense not to dilute it with elements that no-one is likely to search on. For that reason, using the word “blog” in place of the date would make sense, as it gives both the searcher and the search engine that tiny bit more information about what the page is about.
Yep, all good points. Thanks. The only problem with using /blog/some-title is that if the visitors goes to /blog/, they’d be expecting an index of blog posts, when really, I have my index at the root “/”, so I’d probably have to do a redirect them. It’s just a minor semantic. That’s why I was thinking of using /show/some-tile or /post/some-title as they don’t imply that there’s an index at /show/ or /post/.
You don’t need to redirect them. Just add a page named index.htm to the root blog directory, and use it to hold some sort of blog index or welcome page. The visitor will see that page by default if they don’t give the full URL to an actual page.
Mikl, yeah it’s not a technical problem, but a semantic problem. I don’t want the same content accessible at two different URL’s. I want my blog and article index to by at the site root only. I don’t want to duplicate this same information on a different page. I want a single canonical index.
OK, I see what you mean. In that case, then a redirect would probably be the best solution.