Today Mary Gillen posts a step-by-step guide for configuring a Google sitemap file yourself.
Yesterday we chatted about Google sitemaps...what are they and why you need one. Today let's talk about how to create one of your very own. This is a bit wonky, so welcome to Geekland, everybody.
Here's the software you will need in order to get a sitemap up and running:
a. A text editor application.
For the PC: Notepad. Go to Start > Programs > Accessories > Notepad to launch the application.
For the Mac: Use SimpleText.
b. A File Transfer Protocol (FTP) application. This software allows you to connect from your computer to the server where your Web pages are hosted so you can upload the sitemap file.
Don't have FTP software?
For the PC:
Download Filezilla at http://filezilla.sourceforge.net. It's free and easy to use.
For the Mac: Download Fetch at http://fetchsoftworks.com/. It's free for 15 days, then it will cost you $25 for a single user license.
You will also need the hostname, username and password that allows you to get through server security so you can connect.
c. The Internet Explorer browser: 4.x, 5.x or 6.x version.
Here are the steps to configure a sitemap file:
1. Sign up for a Google account.
a. Go here: http://www.google.com/webmasters/sitemaps /login
b. Click the Create a Google Account link at the bottom right corner of the page.
c. Follow the instructions. You will receive an email with the subject header Google Email Verification. Follow the instructions in the email to verify your account.
2. Download the sample sitemap file called sitemap.xml:
a. If you are on a PC:
Right mouse click on the link below, select "Save Link As" and navigate to the desktop of your computer. Press the Save button.
Download this sample sitemap file for the PC
b. If you are on a Mac:
Click and hold your mouse key down on the link below, select either "Save As" or "Download Link to Disk" and navigate to the desktop of your computer. Press the Save button.
Download this sample sitemap file for the Mac
3. Open the file you just downloaded (sitemap.xml) in your Text Editor application (either Notepad or SimpleText.)
NOTE: In Notepad, be sure the "Files of type" dropdown menu at the bottom of the Open dialog box is set to "All Files" so Notepad will show the sitemap.xml file for you to select.
4. Edit the Sitemap file for your site:
a. Leave lines 1 & 2 alone. Adjust lines 4-9:
If we were looking at Craft Stop's sitemap file, lines 4-9 would look like this:
According to Google's FAQ, here's an explanation of what these sitemap element values mean:
loc = The URL of the main page of your Web site.
In this case, it is Craft Stop's domain name: http://www.craft-stop.com
lastmod - The year, month and day the site was last modified.
Today's date (March 31, 2006) is shown here.
changefreq = How frequently the page is likely to change
This value provides general information to search engines and may not correlate exactly to how often they crawl the page. Valid values are:
always
hourly
daily
weekly
monthly
yearly
never
The value "always" should be used to describe documents that change each time they are accessed.
The value "never" should be used to describe archived URLs.
priority = The priority of this URL relative to other URLs on your site. Valid values range from 0.0 to 1.0. This value has no effect on your pages compared to pages on other sites, and only lets the search engines know which of your pages you deem most important so they can order the crawl of your pages in the way you would most like.
The default priority of a page is 0.5.
Please note that the priority you assign to a page has no influence on the position of your URLs in a search engine's result pages. Search engines use this information when selecting between URLs on the same site, so you can use this tag to increase the likelihood that your more important pages are present in a search index.
b. Add the URL strings for your most important site pages that you want Google to index to your sitemap.xml file
As an example, Craft Stop's sitemap contains the URL strings for all the company's product categories.
How can you grab the URL strings for the pages in your site?
Example:
-- Call up a section page of your Web site in your Web browser
-- Highlight the line of text in the Address bar of your browser window
Copy (Ctrl-C on the PC) the highlighted text, then paste it (Ctrl-V on the PC) between the <loc> and </loc> tags in your sitemap.xml file:
If you need to add more URL strings than provided in the sitemap.xml file, simple copy the following code within your sitemap.xml file:
And paste it at the bottom of the file BEFORE the </urlset> tag.
c. Once you have added all the URL strings, you are done editing the file. Save your file now.
NOTE: If you are using Notepad, be sure the "Files of type" dropdown menu at the bottom of the Save dialog box is set to "All Files" so Notepad will keep the .xml extension of the file. Otherwise, it may place a .txt extension on this file name, and your sitemap will not be recognized by Google.
5. Test the file before you upload it to your server.
The easiest way to test to see if your sitemap.xml file is what they call "well-formed" xml (meaning you don't have any typing errors in the file) is to open it using the Internet Explorer browser.
-- From the word menu at the top of the Internet Explorer browser, select File > Open > Browse.
-- Select All Files in the Files of type dropdown menu at the bottom of the dialog box, then navigate to the desktop of your computer.
-- Click once on the sitemap.xml file.
-- Click the Open button.
If the file contains no typing errors, Internet Explorer will display your sitemap file like this:
If you get an error like this:
Internet Explorer is directing you to where you have a typing error in your code.
-- If you see an error message in Internet Explorer, return to your Text editor application (Notepad or SimpleText), correct the error, save the file once more, then test again in Internet Explorer until all your errors have been corrected.
Tired yet? Let's keep going.
6. Upload the sitemap.xml file to the server.
a. Using your FTP software, upload your sitemap.xml file to the main directory of your server.
b. Note the URL of the sitemap file. You will need this info later.
As an example, Craft Stop's sitemap file would be http://www.craft-stop.com/sitemap.xml if it was loaded in the main directory on the server.
7. Go to your Google account. If you aren't logged in, log in again: https://www.google.com/webmasters/ sitemaps/login?hl=en
a. On the next screen, click the Add tab under the Google logo.
b. On the next screen, select the General Web Sitemap option.
c. Click the Next button.
d. Under the words "Enter your Sitemap URL below:" type in your sitemap file URL, as mentioned in step 6b, then press the Add Web SiteMap button.
e. On the next screen, follow the 3 steps to have Google verify your sitemap:
1. Create a verification file
2. Upload the verification file to the server
3. Click the "Verify" button below
Check the blue Verification status block at the bottom of the screen. If the word VERIFIED appears in green, you are good to go.
There. You're done.
Next week we'll chat about the process of maintaining your sitemap. Have a great weekend. See you next week.
Some of the info posted above appears in Google's Sitemap FAQ.
Hi...
In a sitemap for a dynamic site, should I put all the links...or only the important ones?
E.g. a real estate portal can have 50k listings...all of which will have a page...and a unique URL...so would it be wise to put all of them in the sitemap...
Or just a few sample ones, and other URL's that point to categories of the properties...?
Posted by: Sumedh | March 25, 2008 at 08:32 AM
Check out Google's Webmaster Tools at https://www.google.com/webmasters/tools/docs/en/protocol.html
You will find the following info:
"You can provide multiple Sitemap files, but each Sitemap file that you provide must have no more than 50,000 URLs and must be no larger than 10MB (10,485,760) when uncompressed. These limits help to ensure that your web server does not get bogged down serving very large files.
If you want to list more than 50,000 URLs, you must create multiple Sitemap files. If you anticipate your Sitemap growing beyond 50,000 URLs or 10MB, you should consider creating multiple Sitemap files. If you do provide multiple Sitemaps, you can list them in a Sitemap index file. Sitemap index files may not list more than 1,000 Sitemaps."
Hope this helps. - Mary
Posted by: Mary | March 25, 2008 at 08:45 AM