• The permalink for a WordPress category page is: example.com/category/news/company.

    You can still access: example.com/category/news-999/company.

    The alias of the top-level category, “news,” can be changed to any letter and still be accessible, for example:

    • example.com/category/aaaaaaaa/company
    • example.com/category/2345678/company

    Even with incorrect parent category aliases, it is still accessible. Why does this happen? This should be unreasonable, right?

Viewing 5 replies - 1 through 5 (of 5 total)
  • WP uses a hierarchical permalink structure for categories (child categories nested under parents in the URL). Top-level category still allows access to page as WP resolves URL based on the final segment. The slug (‘company’) is matched against the actual category slug in the database.

    If you change news to anything else (e.g., news-999, aaaaaaa , 2345678), WordPress will still look for a category with the slug ‘company’ and its hierarchy, but it does not strictly enforce the parent slugs in the URL as long as the final category matches.

    Thread Starter a10086

    (@a10086)

    If all these pages are crawled by Google, it will result in too many duplicate pages, which could negatively impact SEO, right?

    I’m currently facing this issue…

    Moderator James Huff

    (@macmanx)

    View source on one of those “alias” pages and search in source for “canonical”.

    You should find a <link rel="canonical" pointing to the 1 page that Google will index.

    Thread Starter a10086

    (@a10086)

    But WordPress’s category pages don’t have this tag unless an SEO plugin is installed. Why can’t WordPress handle this issue directly?

    Moderator James Huff

    (@macmanx)

    WordPress has provided its own canonical tags for years, no plugin required.

    Again, just check the source in one of those pages.

    I would have for you, and directly quoted one here, but you haven’t shared your site’s URL. ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.