surfup

Browser sitemap URL collector

A browser-console script follows sitemap indexes from robots.txt and downloads a deduplicated CSV.

Use these steps as a working checklist and adapt them to the project’s evidence, scope, and constraints.

Practical steps

  • Open a page on the target site and open the browser developer console. This script starts from that site’s robots.txt.
  • If browser developer tools block pasting, type the browser’s displayed confirmation phrase yourself. Never paste code you have not reviewed.
  • Paste the full script below and press Enter. It reads Sitemap entries from /robots.txt; if none are found, it tries /sitemap.xml.
  • The script follows nested sitemap indexes, collects page URLs and last-modified dates, removes duplicate URLs, and downloads sitemap-urls.csv. It also decompresses gzip sitemap files in supported browsers.
  • It can read same-origin sitemap files and cross-origin files listed by the site when those servers allow CORS. Requests omit cookies and credentials. Sign-in-only, blocked, or malformed files are reported in the console.
  • Limits: 500 sitemap files, 1,000,000 URLs, 25 MB uncompressed per sitemap file, and three minutes. If a limit is reached, the downloaded CSV may be partial. For very large sites, use a crawler or a command-line parser instead.

Userscript tools and catalogs

Latest materials

All materials

Practical articles and guides by SurfUp.

Guide · 10 min

“What is…” pages and AI answers: lost clicks or falling demand

A bank’s reference section lost 24% of visits as demand fell 13%. How to tell clicks lost to an AI block from falling demand and how to measure it.

Read
Guide · 8 min

Traffic dropped after a Google update

How to tell whether a traffic drop comes from a Google update, seasonality or a site fault. 2026 update timeline, a six-question check and a plan for the first 14 days.

Read
Guide · 9 min

Demand fell or the site lost: reconciling traffic with Wordstat

Demand for deposits fell 75%, traffic 37%; for cards demand −35%, traffic −63%. How to reconcile traffic with demand and not blame the site for the market.

Read