Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm inserting a website map for the first time. I found this page:


That page shows examples about sitemaps with xml, should I insert and xml code in my html? any advice for my first sitemap?

share|improve this question
up vote 1 down vote accepted

This is a sitemap intended for web-crawlers. It is not inserted in any page but left as a separate XML file on your server. By the way, there is also a text version of this which is simply one absolute URL per line in a text-file. It does not have any metadata though.

For it to be found, you simply add a line identifying the file from your robots.txt. This will let any crawler find it. Google also accept a manual sitemap submission through their Webmaster Tools. Both methods are explained by Google here.

share|improve this answer

The Sitemap is an external file. There is no code to insert in your HTML pages.

The sitemap aims to list all urls of your website in order to help search engines to index them. If your website doesn't have a lot of pages or if Google indexes your web pages correctly, I wouldn't recommend you to spend too much time on it.

Google explains how to manually create a Sitemap: https://support.google.com/webmasters/bin/answer.py?hl=en&answer=34657

Once the xml file uploaded, you will need to submit it to Google: https://support.google.com/webmasters/bin/answer.py?hl=en&answer=156184

You can also declare the URL of your sitemap in your robots.txt file: http://www.sitemaps.org/protocol.html#submit_robots

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.