admin管理员组文章数量:1194361
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.
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
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.
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
- 2 how are you outputting two different permalinks for the same post? this is not default behavior. WordPress generates a single permalink using the category with the lowest ID. – Milo Commented Jul 17, 2013 at 6:01
- 2 Your article will have just one permalink. – fuxia ♦ Commented Jul 17, 2013 at 6:01
- but why my article is visible at "/foo/my-post" and "/bar/my-post" ? – ITChristian Commented Jul 17, 2013 at 6:03
- Google say that if will find same content at two different urls on the same site, it will consider it as duplicate => spam... – ITChristian Commented Jul 17, 2013 at 6:04
- 1 okay, but categories foo and bar are visible and shows list of aticles... so category foo links to permalink with foo/ and category bar links to permalink with bar/ – ITChristian Commented Jul 17, 2013 at 6:35
2 Answers
Reset to default 1If 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.
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.
本文标签: Multiple post categoriessingle permalink
版权声明:本文标题:Multiple post categories - single permalink 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1738488460a2089562.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论