Overall, URLs are a very small signal for SEO. You have the potential to have good SEO regardless of whether or not you put the category into the URL. There are many possible good URL structures for any site. The most important things are that:
- The URLs don't change often
- If URLs do change, you redirect from the old to the new
- Each piece of content has a single preferred URL
- If multiple URLs can get to the same content, you mark the preferred one as canonical either with redirects or tags.
I prefer simpler URLs for SEO that don't have the category. The ideal URL would be:
and my second choice would be:
You should include the ID, only if your content management system needs it to look up the article by id, rather than by name.
Ideally, the slug should:
- Uniquely identify the content on your site
- Adequately describe what the post is about
- Contain the main keywords
- Make sense to a human
- Use as few words as possible
- Be all lower-case
- Be short and simple enough it could be typed
- Be short and simple enough it could be memorable
If your article were titled "How many blue widgets to choose for a fishing trip," I might make the slug be just
/fishing-widgets (assuming this is the only article related to fishing and widgets on your site.)
I would avoid putting the category (
widgets) in to that URL because:
- It often duplicates keywords from the slug
- It allows you to re-categorize your articles without changing URLs and having to implement redirects
- It uses less punctuation in the URL, which makes it more user-friendly
- It keeps the URL shorter, which makes it more user-friendly
I prefer to use categories for organization within the HTML of the pages, but not in the URL. It is a great idea to organize content into categories and have a page for each category. You can have breadcrumbs on the page that show the category. You can link each post to related categories and other posts in the same category.
Using categories on your site but not in your URLs keeps your site well organized while keeping the URLs simple, friendly, and optimized for SEO.