Skip to content

Generate sitemap.xml #2347

@mroderick

Description

@mroderick

Description of the issue 📄

There are many 404 Not found log entries for /sitemap.xml, because search engine crawlers are trying to find one and none can be found.

Screenshots 📷

We get a lot of log lines like these

2025-09-15T19:25:35.721003+00:00 app[web.3]: [07030b65-be40-4c12-a957-4d6f2de7c23a] Started GET "/sitemap.xml" for 172.70.80.167 at 2025-09-15 20:25:35 +0100
2025-09-15T19:25:35.738385+00:00 app[web.3]: [07030b65-be40-4c12-a957-4d6f2de7c23a] Processing by ChapterController#show as XML
2025-09-15T19:25:35.738469+00:00 app[web.3]: [07030b65-be40-4c12-a957-4d6f2de7c23a]   Parameters: {"id" => "sitemap"}
2025-09-15T19:25:35.747908+00:00 app[web.3]: [07030b65-be40-4c12-a957-4d6f2de7c23a] Completed 404 Not Found in 9ms (ActiveRecord: 0.8ms | Allocations: 8081)
2025-09-15T19:25:35.750622+00:00 heroku[router]: at=info method=GET path="/sitemap.xml" host=codebar.io request_id=07030b65-be40-4c12-a957-4d6f2de7c23a fwd="216.73.216.141, 172.70.80.167" dyno=web.3 connect=0ms service=31ms status=404 bytes=0 protocol=http1.1 tls=true tls_version=unknown

These shouldn't be hitting the Rails app, nor producing any log lines.

Steps to fix 🛠

Implement sitemap.xml :-)

To do 📋

  • Claim this issue (comment below, or assign yourself if you are part of the codebar org)
  • Fork and clone the repository
  • Update the relevant files. Follow the steps to fix section in this issue.
  • Commit your changes as one commit. Use the title of this issue as your commit message
  • Submit a pull request
  • Mention this issue in the PR description by including it's number
  • Have your pull request reviewed & merged by a codebar team member

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions