I have some panic when I search from the internet to see how can we change the home page of Azure Function under .NET. In this post I will help you easy to change it some config and setting .

Image description

You can change it by modifying the content using the host.json.
You need to add "extensions": { "http": { "routePrefix": "" } } in your host.json, Example :

{
    "version": "2.0",
    "logging": {
        "applicationInsights": {
            "samplingSettings": {
                "isEnabled": true,
                "excludedTypes": "Request"
            },
            "enableLiveMetricsFilters": true
        }
    },
    "extensions": { "http": { "routePrefix": "" } }
}

And now, you need to define a function return the home page information, in this example we will return the home page with result Hello from Azure Function!

[Function("RootFunction")]
        public IActionResult Run(
            [HttpTrigger(AuthorizationLevel.Anonymous, "get",
                Route = "{ignored:maxlength(0)?}")]
            HttpRequest req,
            string ignored = "")
        {
            _logger.LogInformation($"C# HTTP trigger function processed a request.");
            return new OkObjectResult("Hello from Azure Function!");
        }

Now when you look back after deployment, you can see the result.

Image description

Enjoy !

Reference