Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't include the 404 route in XML sitemaps #2605

Closed
jdevalk opened this issue Apr 14, 2020 · 4 comments · Fixed by #2616
Closed

Don't include the 404 route in XML sitemaps #2605

jdevalk opened this issue Apr 14, 2020 · 4 comments · Fixed by #2616
Labels
bug An error in the Docusaurus core causing instability or issues with its execution difficulty: starter Issues that are starter difficulty level, e.g. minimal tweaking with a clear test plan. help wanted Asking for outside help and/or contributions to this particular issue or PR.

Comments

@jdevalk
Copy link

jdevalk commented Apr 14, 2020

🐛 Bug Report

When testing the XML sitemaps I found that the first URL in it on our site was the 404 route:

<url>
    <loc>https://developer.yoast.com/404.html</loc>
    <changefreq>weekly</changefreq>
    <priority>0.5</priority>
</url>

Have you read the Contributing Guidelines on issues?

Yes

To Reproduce

(Write your steps here:)

  1. I guess: open any DocuSaurus v2 XML sitemap.

Expected behavior

The XML sitemap should only contain URLs that should return a 200 status code.

Actual Behavior

As shown above, the 404.html file was included, which should not be indexed.

Your Environment

  • Docusaurus version used: v2
@jdevalk jdevalk added bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers labels Apr 14, 2020
@yangshun yangshun added difficulty: starter Issues that are starter difficulty level, e.g. minimal tweaking with a clear test plan. help wanted Asking for outside help and/or contributions to this particular issue or PR. and removed status: needs triage This issue has not been triaged by maintainers labels Apr 14, 2020
@yangshun
Copy link
Contributor

Seems legit. PRs welcome!

@RDIL
Copy link
Contributor

RDIL commented Apr 16, 2020

I opened a PR to fix this issue.

@jdevalk
Copy link
Author

jdevalk commented Apr 17, 2020

Awesome. I've asked @jcomack to test it :)

@jcomack
Copy link
Contributor

jcomack commented Apr 17, 2020

I checked the instance that was spun up for the PR and that looked good to me :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error in the Docusaurus core causing instability or issues with its execution difficulty: starter Issues that are starter difficulty level, e.g. minimal tweaking with a clear test plan. help wanted Asking for outside help and/or contributions to this particular issue or PR.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants