How to submit a sitemap.xml to Google Webmaster when using Heroku hosting

You may be facing the need to notify Google of your sitemap file, but you don’t know how because you have a rails app running on Heroku.

Ok, here is my hint to sort it out.

My setting is a rails app where I use a gem called sitemap-generator that you can see here: This gem works great, by the way.

My app is hosted in Heroku. And as you may probably know, Heroku does not have space for files, so you need to host everything in another server. In my case I use cloud hosting in Amazon, using Amazon Web Services S3.

So my sitemap is stored in the following address:

And this is the url you have to submit to Google Webmaster. In order to set up the Webmaster account, you cannot do it with the true domain, because then you cannot refer to the file. I mean, that if your domain is “” then google will expect that you submit an xml file after…

So you have to create a new account starting with and then add your sitemap file to be submitted.

Also, in my application I am using multiple subdomains, since each user account has her own subdomain. In this case you have to make an additional configuration and it is to set up verification with DNS text record, as explained here If you don’t do this, you will be getting plenty of these error messages:

This url is not allowed for a Sitemap at this location.

Thank you to barmstrong in this forum for providing the links:!msg/webmasters/w4gMRNFHMlA/24pUYqi69mkJ

If you need further help, please get in touch with me via comments.

Good luck!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s