ClubberLang
ClubberLang

Reputation: 1896

Blazor and Google sitemap.xml

I have a blazor application and a sitemap.xml file on disk. To access this file I use this code:

public class SiteMapController : Controller
{
        private IConfiguration _configuration;

        public SiteMapController(IConfiguration configuration) : base()
        {
            _configuration = configuration;
        }

        [Route("sitemap{ext}")]
        public async Task<ActionResult> SitemapAsync(string ext)
        {
            string siteMapPath = _configuration["App:Sitemap"] + ext;

            return PhysicalFile(siteMapPath, "application/xml", "sitemap" + ext);
        }
}

I have pushed the code in production, I can download the file with the browser. By example:

https://www.socloze.com/sitemap_index.xml

But :

So, why?

If the browser can get the file, Google and other services should also be able to download it, right?

Upvotes: 0

Views: 544

Answers (1)

ClubberLang
ClubberLang

Reputation: 1896

After 24h, finally, it was able to download the file and process it, it seems to be a google issue.

Upvotes: 1

Related Questions