• Resolved gion

    (@gion)


    I have a category “a” with subcategories “b”,”c”,”d” with the following hierarchy: a>b>c>d.
    If I set the primary category to “a” then the post URL becomes http://site.com/a/post.
    If I set the primary category to “d” then the post URL becomes http://site.com/a/b/c/d/post.
    Furthermore I have found out that there exist (with no act of mine) 15 different URLs of all possible combinations of URL parts intervening in the dotted area of http://site.com/……/post. These combinations are: [a] – [b] – [c] – [d] – [a/b] – [a/c] – [a/d] – [b/c] – [b/d] – [c/d] – [a/b/c] – [a/b/d] – [a/c/d] – [b/c/d] – [a/b/c/d] (replace the dots with any of them). All these URLs are redirecting 301 to the primary category, apart the primary category which has a status code 200. If I change the primary category, the new primary category URL gets the status code 200, the old primary category URL redirects 301 to the new primary category, and all other 13 URLs redirect now to the new URL formed by the selection of the new primary category.
    I have two questions:
    1) Are all the above features due to Yoast SEO plugin?
    2) Is it SEO-safe to change primary category anytime or are there any caveats?

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
    • The primary category is a feature of Yoast SEO plugin. However, when you change the primary category and the redirect occurs isn’t a feature of Yoast SEO plugin. The redirect is most probably occurring from the WordPress.
    • If your permalinks structure is using the category, the primary category will appear in the URL. So, once you change the primary category, it is recommended to create a 301 redirect that will go from the old URL to the new one. However, if the redirect is automatically occurring for you, you are free to change the primary category at anytime

    Closed due to inactivity.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘change primary category’ is closed to new replies.