dnsimple / dnsimple/dnsimple-developer

Sitemap includes non-content files (assets, scripts, robots.txt)

Open
#1,024 1 comment 0 reactions 2 assignees View on GitHub

@weppos is already working on this.

Since May 27, 2026.

Dominant language
HTML
Stars
39
Forks
34
Avg merge
4d 17h
Merged PRs (30d)
11

Description

Context

While fixing a sitemap 500 error on the support site (dnsimple/dnsimple-support#1958), @weppos flagged that both sites should be kept in sync. This issue tracks the equivalent problem on the developer site.

What's wrong

The live sitemap at https://developer.dnsimple.com/sitemap includes non-content files that should not be indexed:

  • assets/css/style.css
  • assets/images/border.jpg (and 15+ other image files)
  • ddns/ddns.sh
  • robots.txt
  • llms.txt
  • v2/openapi.yml
  • The sitemap page itself (/sitemap)

These inflate the sitemap with low-value URLs and can signal poor sitemap quality to crawlers.

Additionally, all entries share the same lastmod date (2026-05-25), which reflects the last deploy timestamp rather than actual content changes. Google has said it ignores or distrusts lastmod when it appears inaccurate or uniform across all URLs — which is exactly the case here.

What already exists

lib/default.rb has a sitemap_items helper that's already doing some filtering — it excludes is_hidden items and the /v2/platform/ subtree. The fix builds on that by also excluding items that don't resolve to page URLs.

Suggested fix

In lib/default.rb, update sitemap_items to reject items whose path is nil or doesn't end with / (pages on this site use trailing-slash URLs; assets and files resolve to extensions):

def sitemap_items
  @items.reject do |item|
    item[:is_hidden] ||
      platform_sitemap_excluded?(item.identifier.to_s) ||
      item.path.nil? ||
      !item.path.end_with?('/')
  end
end

This would keep all legitimate content pages (/v2/domains/, /getting-started/, etc.) while excluding CSS, images, scripts, text files, and the sitemap itself.

References

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.