Coder Social home page Coder Social logo

Comments (3)

kenkunz avatar kenkunz commented on September 27, 2024

I have discovered some issues with our current sitemap.xml that I think are worth addressing.

1. sitemap.xml includes references to nested sitemaps

Our current sitemap.xml includes references to:

As a rule, sitemaps should include entries for pages, and sitemap indexes should include references to other sitemaps. A sitemap itself should not include nested sitemap entries.

See:

Recommended solution

Create a sitemap index served from /sitemap.xml which references other sitemaps.

Alternatively, we could read all other sitemaps and compose a single sitemap.xml. This seems more cumbersome and costly, and may result in size or performance issues down the road.

from frontend.

kenkunz avatar kenkunz commented on September 27, 2024

2. Nested sitemaps served from invalid path nodes

Our nested sitemaps for exchanges and pairs are at a different node in the page hierarchy than the pages they reference.

Per Google's documentation linked below:

Sitemaps that are referenced in the sitemap index file must be in the same directory as the sitemap index file, or lower in the site hierarchy. For example, if the sitemap index file is at https://example.com/public/sitemap_index.xml, it can only contain sitemaps that are in the same or deeper directory, like https://example.com/public/shared/....

See:

Recommended solution

This could be fixed by having a frontend proxy that serves these resources from the correct path node. E.g., /trading-view/sitemap-exchanges.xml route would proxy the content from /api/sitemap/exchanges/sitemap.xml. The proxy route is what would be included in the sitemap index.

from frontend.

kenkunz avatar kenkunz commented on September 27, 2024

3. Blog and Glossary sitemaps

Our current sitemap.xml does not include the glossary sitemap (even with the "incorrect" nesting approach).

Blog posts are currently via /blog/rss.xml, which is not a valid format within a sitemap index.

Recommended solution

Use a sitemap index (see 1. above) and include /glossary/sitemap.xml as well as a new /blog/sitemap.xml.

from frontend.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.