I have created a Custom Post type and its own respective taxonomy.
I have for example this URL structure: /
The same content can also be accessible through this link: /
How can I write a rewrite so the second URL is not available especially for google SEO perspective and avoid duplicate content
I have created a Custom Post type and its own respective taxonomy.
I have for example this URL structure: http://www.example/faq/category/sub-category/test-post/
The same content can also be accessible through this link: http://www.example/faq/category/test-post/
How can I write a rewrite so the second URL is not available especially for google SEO perspective and avoid duplicate content
Share Improve this question asked Jan 29, 2019 at 14:43 JojoJojo 113 bronze badges1 Answer
Reset to default 0Your taxonomy is set to 'hierarchical' => true,
do you have the post included in both the parent and child category?
If you untick the parent category
and only tick sub-category
then it should use the first URL only.