Overview

Routing in Razor Pages is file-based. URLs are routed to pages based on their location in the filesystem:

URLPath
/ or /Index/Pages/Index.cshtml
/Contact/Pages/Contact.cshtml
/Store or /Store/Index.html/Pages/Store/Index.cshtml
URLMaps to this Razor page
www.example.comPages/Index.cshtml
www.example.com/indexPages/Index.cshtml
www.example.com/productsPages/Products/Index.cshtml
www.example.com/products/createPages/Products/Create.cshtml