How to list all the available urls with Kirby


Could anyone please let me know, on how I could list all the urls available with Kirby. I went via the documentation(api reference) but didnt really find a direct answer for this. Thank you for your help. :slight_smile:

You can fetch all page URLs by looping through the site index:

foreach ($site->index() as $p) {
  echo $p->url();

In a multi-language context, you would have to get the URLS for each language separately.

This will not return URLs generated in your templates, e.g. for tag filtering etc. or URLs you create via routes.

1 Like

You can also use a tool called Screaming Frog which is designed for SEO optimisation. It will crawl your site and list all reachable pages, including tagged URLs and paginated sections (not sure about multilingual pages). As long as there is a link to something somewhere on your site, this will find it. You can copy the page list from Screaming Frog out to Excel.

1 Like

Thank you! that helped :slightly_smiling_face:

Never knew about screaming frog. Looks like I can do more with that :innocent:. Thank you so much for suggesting this.