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

robots.txt points to an invalid sitemap.xml URL on data.gov #5077

Open
tdlowden opened this issue Feb 7, 2025 · 2 comments
Open

robots.txt points to an invalid sitemap.xml URL on data.gov #5077

tdlowden opened this issue Feb 7, 2025 · 2 comments
Assignees
Labels
bug Software defect or bug SEO Improvements

Comments

@tdlowden
Copy link
Member

tdlowden commented Feb 7, 2025

Google Lighthouse reports that our reference to /sitemap.xml in our robots.txt is invalid. Maybe it needs to be absolute rather than relative?

Image

How to reproduce

  1. Run Google Lighthouse report at https://pagespeed.web.dev/analysis/https-data-gov/egrvea4vmk?form_factor=desktop
  2. View SEO issues

Expected behavior

The sitemap link is valid in robots.txt

Actual behavior

According to Lighthouse, the sitemap URL is invalid

Sketch

TBD

@neilmb
Copy link

neilmb commented Feb 7, 2025

Sitemap values in robots.txt need to be URLs, not just paths https://www.woorank.com/en/blog/how-to-locate-a-sitemap-in-a-robots-txt-file

This can be tricky in an 11ty site because when it builds the sitemap, it needs to know the base URL that the site will eventually be deployed on. https://github.com/cisagov/get.gov/pull/138/files is an example of a possible solution.

@neilmb
Copy link

neilmb commented Feb 7, 2025

@Bagesary Bagesary moved this to 📟 Sprint Backlog [7] in data.gov team board Feb 13, 2025
@Bagesary Bagesary assigned Bagesary and neilmb and unassigned Bagesary Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Software defect or bug SEO Improvements
Projects
Status: 📟 Sprint Backlog [7]
Development

No branches or pull requests

3 participants