Extract all URLs from a sitemap.xml
extract urls from sitemap.xml | list all pages in a sitemap | sitemap to url list command line | count urls in sitemap | curl | sitemap | grep | seocurl -s https://example.com/sitemap.xml | grep -oP '(?<=<loc>)[^<]+' | sort -uFetches the sitemap and extracts the content of all <loc> elements. Useful for further processing, counting with wc -l or comparing against a crawl. For a sitemap index (WordPress, Yoast, Rank Math), only the child sitemaps appear here.
Note: URLs inside <![CDATA[...]]> are not recognized. To resolve all child sitemaps of an index, see the entry on the sitemap index.
Also searched as
- extract urls from sitemap.xml
- list all pages in a sitemap
- sitemap to url list command line
- count urls in sitemap