Lowercase URLs in C# MVC
Kenny Robinson
2026-07-03
1 minute read
72 words
Lowercase URLs are common with APIs. TO implement this throughout your entire application, you can use the below in your Program.cs file.
builder.Services.Configure<RouteOptions>(options =>
{
options.LowercaseUrls = true;
// options.LowercaseQueryStrings = true;
});
The LowercaseQueryStrings option will enforce that the query
parameters also be lowercased. If using case-sensitive parameters,
this option should be disabled.