What is Routing in Astro?

In Astro, “routing” refers to how your website’s URLs are mapped to the content that gets displayed on those URLs. Astro employs a very intuitive and powerful file-based routing system. This means you don’t typically create a separate “routes” configuration file; instead, your project’s file structure directly dictates the URLs of your site.

Here’s a breakdown of routing in Astro:

1. File-Based Routing: The Core Concept

2. Static Routes