Yoast / wordpress-seo

Yoast SEO for WordPress
https://yoast.com/wordpress/plugins/seo/
Other
1.76k stars 885 forks source link

The sitemap can show links with anchors #10291

Open moorscode opened 6 years ago

moorscode commented 6 years ago

Please give us a description of what happened.

tweet

This is highly likely coming from plugins (or themes) that hook into our sitemap flow.

How can we reproduce this behavior?

  1. Register a link to the sitemap containing a hashmark

Context

Links containing a hashmark are essentially the same URL as without.

Todo

jonoalderson commented 6 years ago

Hmm. Some site setups (particularly early generation Single Page Apps) might use anchor states, in conjunction with the History API, to change the page / state of the page.

E.g., example.com/#about and example.com/#products might render different states.

We should probably strip this automatically, but leave an option/filter for people to disable that disabling...

markhowellsmead commented 2 years ago

Has any progress been made on this? Are anchor links stripped from the sitemap URLs?

PabVidCal commented 2 years ago

Any news about this option?

jonoalderson commented 2 years ago

Do you have an example site which is including these? Would be good to understand what's causing this in the wild.