I’ve noticed that WordPress is generating duplicate content with slightly different URLs. For example:
http://example.com/the-blog/?tag=santas-workshop
http://example.com/the-blog/tag/santas-workshop/
Notice that, one is /?tag=
(i.e. a query) and the other /tag/
(i.e. a subdirectory).
I deactivated all plugins but both URLs were still “200”. Can’t find any settings to change. Any suggestions for fixing this?
I would like to suggest you to learn how WordPress Rewrite API works. When you learn it, you won’t have such kind of questions. Take a look at The Rewrite API: The Basics and The Rewrite API: Post Types & Taxonomies.
TLDR: The permalink structure like
http://example.com/the-blog/?tag=santas-workshop
is the default approach to determine what should be displayed on a page. In the same time thishttp://example.com/the-blog/tag/santas-workshop/
is advanced version of default permalink structure. Internally WordPress will reformat advanced version toindex.php?tag=santas-workshop
and will use it as current request URL.So you don’t have to worry about existence of
...?tag=...
URL, it is standard and expected permalink structure for WordPress. Just use your advanced version of URLs.Even more, your theme could support canonical URLs and will add canonical URL meta to each page. In this case Google Bot won’t care which URL he will use to grab your page, it will always refer to canonical one found in meta.