0

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 :

  • When I use the Google Search Console, I got an error: "unable to retrieve the sitemap"
  • I have tried some sitemap validators, and indeed, they cannot access the file

So, why?

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

ClubberLang
  • 1,624
  • 3
  • 21
  • 45

1 Answers1

1

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

ClubberLang
  • 1,624
  • 3
  • 21
  • 45