Hello I have a problem with wordpress default category linkbuilding. I want to display category page with link mywebsite.com/products/company/. And I did it, but I can also get to this page witin mywebsite.com/company/. And this is what I dont want, is that a default wordpress linkbulding or am I missing something? Thanks in advantage.

  • What is company? is it a page slug? Or a category slug? Are you using category archives, or have you repurposed page templates to try and duplicate that functionality? And is it redirecting to the correct URL? Note that this is not normally called link building – Tom J Nowell Dec 2 '19 at 15:23

If you're using pretty permalinks - which you are, with this type of URL - WordPress will automatically try to figure out any URL that you type in.

In your example URL, "company" is the slug. So, when you type in example.com/company, WordPress uses that slug to figure out "Okay, I only see one post with the slug 'company,' and that one is a subpage of 'products,' so I'll send them there."

WP does redirect rather than just displaying the page at that URL, so you shouldn't run into issues with search engines indexing the shorter URLs. If you want to be doubly certain, make sure you have canonical URLs set (such as by using an SEO plugin, or a theme that adds them for you) to tell search engines the long URL is the desired one, and don't link to the short version.

  • Thank you for making it clear. – Alex Dec 3 '19 at 15:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.