function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
AtnMAtnM 

Creat a sitemaps in text or sitemap protocal format

Hi,

 

I'd like to create a sitemap for google for our website. The only problem is that the file google looks for needs to be in xml or txt format. Is there a way to do this?

 

Thanks!

Scott

Best Answer chosen by Admin (Salesforce Developers) 
BulentBulent

More investigation showed that you can do this in two different ways today:

 

1- Submitting Sitemaps using robots.txt
You can tell Google and other search engines about your Sitemap by adding the 

following line to your robots.txt file (updating the sample URL with the complete path to your own Sitemap):

Sitemap: http://example.com/sitemap_location.xml

2- submitting the url as a site map via google webmaster tools account

You can either create a visualforce page contenttype="txt/xml" and 

manually populate the urls in xml format or dynamically create the page based on controller. 

And enable this page for your site and submit the url to google as your sitemap url 

or include it in the robots.txt which we do support