This page has been robot translated, sorry for typos if any. Original content here.

Structure and Script (php) Google Sitemap



  • Google Sitemap Structure
  • Google Sitemap Creation Script


  • By completing your site with a Google Sitemap , you kill two birds with one stone: first, you can be sure that Google will index all of the pages on your site that are in this file, and second, Google will regularly scan this file for new pages for indexing.

    In this article we will discuss a number of issues related to Google Sitemap:

    1. The benefits derived from the introduction of Google Sitemap in their activities;
    2. Who should use it;
    3. How it works;
    4. How to create a Google Sitemap for your site;
    5. How to create a dynamic XML file Google Sitemap;
    6. Tools for generating a third-party Google Sitemap.

    Benefits derived from the implementation of Google Sitemap in its activities:

    1. Accelerate the process of finding and adding pages to a Google index.
    2. The rapid finding of Google's undergone pages of the site.
    3. Ensuring a faster hit site in the results of search results Google.
    4. Google’s help in updating its index with fresh content, as a result of which Google users receive relevant and fresh content in response to their search queries.

    Who should use it?

    Each site owner can use Google Sitemap no matter how many pages there are one or a million pages. But all the same it is most necessary to use Google Sitemaps for those sites whose pages undergo very frequent changes.

    It usually happens that a certain number of site pages are not indexed , although links leading to them are correctly recognized by search engines. The reason for this is trivial - the location of links to these pages in the depths of the site, i.e. the search robot does not reach these links, respectively, does not find these pages. To avoid this problem, you can use Google Sitemap .

    Remember: using Google Sitemap does not give an advantage when ranking!

    How it works?

    Google Sitemaps are created using XML (Extensible Markup Language). This language is often used in feeds and blogs.

    Below is an example of the XML code that you should include in every page of your site:

    [url]
    [loc]http://www.yoursite.com/[/loc]
    [lastmod]2005-07-15[/lastmod]
    [changefreq]monthly[/changefreq]
    [priority]0.5[/priority]
    [/url]

    Below is a description of each line of code:

    • location - the address of the web page, for example http://www.yoursite.com
    • last modified - the last modified date of the page
    • change frequency - tells Google how often you update the webpage. Possible values: never, weekly, daily, hourly, monthly, yearly
    • priority - sets the priority that Google will assign to a specific web page. Possible values: 0.0 (lowest priority), 1.0 (highest priority), 0.5 (medium priority).

    Some web pages of your site may be of particular priority , since Frequently updated , for example, the main (home) page of the site, the articles page, so they need to assign the highest priority ...

    Once again I repeat - Google Sitemap does not affect the ranking of the site.

    How to create a dynamic XML file Google Sitemap?

    If your site consists of 1000 pages or more, then creating a Google Sitemap manually will be too long, dreary and inconvenient.

    Fortunately, Google provides its own script, called Sitemap Generator , which allows you to generate the necessary file very quickly. This script is written in Python, it creates a Sitemap for your site using the Sitemap Protocol . This script can create Sitemaps from a list of URLs , web server directories, or from access logs.

    You can find out more information about the tools provided by Google for webmasters here: https://www.google.com/webmasters/sitemaps/login

    Tools to generate a third-party Google Sitemap

    Google also provides information about other sitemap generators.

    For example, I use a free sitemap generator. It is easy to use, and it quickly generates the necessary XML code for the site.

    Below I give a step-by-step plan for creating a Google Sitemap using one of the many free Sitemap generators:

    1. Go to the site http://www.sitemapspal.com and enter the address of your site in the form at the very top of the site page
    2. Click Submit
    3. Copy the code generated for your site and paste it into a clean text notepad file (notepad)
    4. Save this text file as sitemap.xml
    5. Upload this file to the root directory of your site (where the home page of the site is located)
    6. In the address bar of the browser, type the full path to the generated file, for example http://www.yoursite.com/sitemap.xml. If you did everything correctly, you will see a list of URLs and no errors.
    7. Now open your Google Sitemap account and add this path (from step 6) to the appropriate column in your account.
    8. Follow these steps for each of your site.

    Summary

    Google is the largest and most popular search engine in the entire Internet. Every year, millions of websites are indexed by Google, which naturally complicates the task of finding your site in search results (SERP). So create and start using Google Sitemap right now.

    Google Sitemap Script (php) for Static Websites

    Just completed a Google sitemap script in PHP. I found it not suitable. Most scripts are incomplete and wont run on my server. It’s a simple thing like a sitemap. So i wrote my own script in PHP.

    Google Sitemap Script (php) for Static Websites [ Google Sitemap Script (php) for Static Websites ] [ Google Sitemap Script (php) for Static Websites ] [ Google Sitemap Script (php) for Static Websites ]

    Some people are asking $ 20 - $ 25 for the same set of features! I dont charge a penny for it! Its FREE !!!

    Have a look at the features below:

    1. Set option to ignore certain files
    2. Set option to ignore certain file extensions (ex. Doc, pdf etc)
    3. Set option to ignore certain folders.
    4. Sitemap updates for each server you need to create.
    5. Follows sitemap protocol specified by Google.
    6. Includes a nice sitemap output.

    Installation Instructions:
    1. Unzip sitemap.zip
    2. Upload sitemap.php, sitemap_config.php and sitemap_style.xls to your root directory (document root).
    3. Open sitemap_config.php and set up values ​​for your own website.
    4. Open sitemap.php in browser - you are done!

    If you have trouble using this sitemap or have any queries then post a comment below this post.