Click here to Skip to main content
15,887,267 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,
I am using Visual studio 2019. I added a Web.sitemap to my ASP.net (mvc) solution and also added the sitemap tags to my Web.config (see code below). The questions I have are 1 - How do I test to see if my sitemap is correct and 2 - What do I assign in google search console? In the console, on the left, there is a tab titled "Sitemaps". And on the right is a textbox which accepts the website name. But no matter what I add, google says "couldn't fetch".

My Web.sitemap file...
<pre><?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
  <siteMapNode url="~/" title="Home"  description="Test1">
    <siteMapNode url="~/Home/Index" title="Upload Card"  description="Description1" />
    <siteMapNode url="~/Home/GradedCards" title="Graded Cards"  description="Description2" />
  </siteMapNode>
</siteMap>


My Web.config file snippet...
<system.web>
  <compilation debug="true" targetFramework="4.7.2" />
  <httpRuntime targetFramework="4.7.2" />
    <siteMap defaultProvider="DefaultSiteMapProvider" enabled="true">
        <providers>
            <add name="DefaultSiteMapProvider"
                 type="System.Web.XmlSiteMapProvider"
                 siteMapFile = "Web.sitemap" />
        </providers>
    </siteMap>
</system.web>


What I have tried:

For testing my sitemap I went to Validate XML Sitemap - XML Sitemaps Generator[^] and I tried the following...For each of them, the site tells me that "Sitemap is valid No"
http:www.grademycardforfree.com/Web
http:www.grademycardforfree.com/Web.sitemap
http:www.grademycardforfree.com/Web.sitemap.XML
http:www.grademycardforfree.com/sitemap.XML

In my google search console, in the "Add a new sitemap" I've added the following... None of them worked either.
http:www.grademycardforfree.com/Web
http:www.grademycardforfree.com/Web.sitemap
http:www.grademycardforfree.com/Web.sitemap.XML
http:www.grademycardforfree.com/sitemap.XML


Any help is greatly appreciated!
Thanks
-Doug
Posted

1 solution

Hello !

in the file web.sitemap,
the url you fill are uri.. so a wrong information.

start them by "http" or "https" :

"http://www.fullpath.required/index.asp"

to validate your sitemap, reach a sitemap validator on the internet.

One other thing :
sitemaps are single file at root of a web server.
don't be mistaken by embeded asp object to achieve the build of a web page.
is the 'swimming pool' class/entity a real one ? not sure of that.



UPDATE : //

create a file with your sitemap content on the root of your server,
name it "sitemap.xml"
and wait for a call from web crawler
 
Share this answer
 
v3
Comments
DougSchofield 24-May-22 14:14pm    
I made the changes you recommended but it didn't work. I went to www.xml-sitemaps.com/validate-xml-sitemap.html to validate it and its not there. Thanks anyways


<sitemap xmlns="https://schemas.microsoft.com/AspNet/SiteMap-File-1.0">
<sitemapnode url="http://www.grademycardforfree.com/Home" title="Home" description="Test1">
<sitemapnode url="http://www.grademycardforfree.com/Home/Index" title="Test2">
<sitemapnode url="http://www.grademycardforfree.com/Home/GradedCards" title="Test3">

DougSchofield 24-May-22 14:15pm    
<sitemap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0">
<sitemapnode url="http://www.grademycardforfree.com/Home" title="Home" description="Test1">
<sitemapnode url="http://www.grademycardforfree.com/Home/Index" title="Test2">
<sitemapnode url="http://www.grademycardforfree.com/Home/GradedCards" title="Test3">
DougSchofield 24-May-22 14:23pm    
Can someone please advise me. I am really struck

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900