Multiple post categories – single permalink

I created a post which is assigned to multiple categories.

Eg: I have a post “My Post”, and I put it in “foo” and “bar” categories.
Now my article will have two permalinks, “/foo/my-post” and “/bar/my-post“.
Google calls this a duplicate, which it considers to be spam, hence this is not what I want.

Read More

How can I use multiple categories but have the same permalink?
I want this only for SEO.

My current permalink structure is /%category%/%post_id%-%postname%.html

Related posts

2 comments

  1. If you are using category name in permalink for a post, it’s not a good practice, especially, if you have two or more categories per post.

    Solutions:
    Use canonical link tag for the post and add it to your prefered absolute URL. Google will rank only this one and it won’t be as duplicate content.

  2. It can’t generate 2 URLs for a single post. If not specified otherwise will probably take the variable /category/ from your first category. Not duplicate content.

    This is a common WordPress behavior. I’m seeing this on most of the websites I’ve published with that URL structure – /%category%/%post_id%-%postname%.html

    I have also read your comment, and if your post shows with different URLs, although unlikely, there’s something wrong with your setup.

Comments are closed.