Sitemap lists hundreds of URLs that declare a different canonical
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 83/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript, node.js
- Domain
- documentation
Research direction
Start with the sitemap filter in astro.config.mjs and review the canonical URL declarations added in #2432 alongside the filter change in #2430. Compare generated sitemap entries with each page’s canonical URL to find why 635 entries differ. Done means the sitemap contains only pages whose listed URL is their own canonical.
Written by the indexing model from the issue text.
Description
Environment information
Version: main at 854213b2 and the live site, https://expressjs.com
Platform: not relevant, this is generated build output
Node.js version: not relevant
Any other relevant information: the filter in astro.config.mjs says "Only the canonical URLs belong in the sitemap", and it was tightened with that goal in #2430. The canonical URLs themselves were declared in #2432, but the sitemap filter doesn't take them into account.
What steps will reproduce the bug?
- Open https://expressjs.com/sitemap-0.xml.
- Compare each
<loc>with therel="canonical"of that page.
Of the 1,311 URLs listed, 635 declare a different page as canonical:
| Listed in the sitemap | Canonical |
|---|---|
/en/ |
/ |
/en/guide/routing/, /es/guide/routing/ |
/en/5x/guide/routing/, /es/5x/guide/routing/ |
/en/api/express/ |
/en/5x/api/express/ |
/es/5x/api/express/ |
/en/5x/api/express/ |
/es/blog/2024-10-15-v5-release/ |
/en/blog/2024-10-15-v5-release/ |
Sending search engines conflicting signals like this can make them ignore the sitemap's hints and spend crawl budget on duplicates.
Expected: the sitemap lists only pages that are their own canonical URL.
- Dominant language
- MDX
- Stars
- 5.4k
- Forks
- 2.3k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 28
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from expressjs/expressjs.com
-
RSS feeds use Atom-style <author> elements, which are invalid in RSS 2.0Possibly taken @NopeCharon claimed this 8 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
expressjs/expressjs.com#2577 ·
Maintainers usually reply within 1 day
-
llms.txt exports drop `import` lines and JSX-like code from code examplesPossibly taken @RaphaelFakhri claimed this 16 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
expressjs/expressjs.com#2561 ·
Maintainers usually reply within 1 day
-
Remove problematic examples from error handling guidePossibly taken @Skytuhua claimed this 24 days ago. Openbug require-triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
expressjs/expressjs.com#2549 · 1 reaction ·
Maintainers usually reply within 1 day
-
Suggestion: mention lint-time security checks on the security best practices pagePossibly taken @methila-2056 claimed this 85 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
expressjs/expressjs.com#2471 ·
Maintainers usually reply within 1 day
-
Document customizing `express.json()` size limit for specific routesPossibly taken @vibhor-aggr claimed this 132 days ago. Open4.x 5.x docs
Difficulty 1/5 Under an hour Newbie friendliness 62/100
expressjs/expressjs.com#1421 · 3 comments · 2 reactions ·
Maintainers usually reply within 1 day
All issues in expressjs/expressjs.com
Similar issues
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 89/100
Maintainers usually reply within 1 day
-
sync-en
Difficulty 1/5 Under an hour Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Team:Admin triaged
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
elastic/docs-content#9532 · 1 comment · 1 reaction ·
Maintainers usually reply within 2 days
-
Area/Connector module/solace Priority/Low Type/Docs
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
ballerina-platform/ballerina-library#9850 ·
Maintainers usually reply within 1 day
-
needs-triage
Difficulty 1/5 1-3 hours Newbie friendliness 85/100
gke-labs/kube-agents#6620 ·
Maintainers usually reply within 1 day