I basically want to add such urls to my existing sitemap index. I'm currently using WP SEO by yoast, but I'm open to trying out alternative plugins. My urls are currently like this...

e.g  www.mysite.com/used-cars/location/paris/model/bmw-m3



I want to have all these kind of urls in a loop, then push them into a sitemap.

How can I do this?

  • WP SEO can handle this all for you. Not sure what you mean by "dynamically" but Yoast's sitemaps are updated every time you update a post. kb.yoast.com/kb/how-to-customize-the-sitemap-index – WebElaine Mar 24 '17 at 13:38
  • WP SEO by Yoast only gets www.mysite.com/used-cars into the sitemap, of which is a custom post type. – joe city Mar 24 '17 at 14:04
  • @joecity you can totally do what you're asking! Unfortunately however, your question is really broad, and asking for plugin recommendations is considered off-topic for our community. If you want to read up on plugin development and try your hand at implementing it yourself, we can definitely help with you specific issues you run into. If you'd like to figure out how to accomplish it with a third-party plugin however, your question would be best addressed by the official support channels or the author of the plugin in question. – bosco Mar 26 '17 at 1:09
  • @bosco Alright, I hear what you're saying. I actually am considering developing the plugin myself, but I'm struggling finding any info on google. I'd really appreciate it if you linked me to sites with info, to get me started – joe city Mar 26 '17 at 12:09

Looks like one of those is the canonical URL, can you take a look at the page source and check if is there a canonical tag?

    <link rel="canonical"...

Also there is a setting in yoast for the sitemap https://kb.yoast.com/kb/how-to-customize-the-sitemap-index/ and you can add your own sitemap too: https://kb.yoast.com/kb/add-external-sitemap-to-index/

Note: Duplicate content will harm your SEO ranking

  • Thanks. I've sorted all the canonical URLs. The issue concerning the urls, is that the site has thousands of such urls. surely there should be another way to add them to the sitemap than one by one like this <loc>http://www.example.com/</loc> – joe city Mar 24 '17 at 18:12

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.