Structure and Script (php) of the Google Sitemap



  • Google Sitemap structure
  • Google Sitemap Creation Script


  • Having completed your site with Google Sitemaps file , you kill two birds with one stone: first, you can be sure that Google will index all the pages of your site in this file; secondly, 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. Benefits resulting from the implementation of Google Sitemap in their activities;
    2. Who should use this;
    3. How it works;
    4. How to create a Google Sitemap for your site;
    5. How to create a dynamic Google Sitemap XML file;
    6. Tools for generating a Google Sitemap from third-party vendors.

    The benefits of implementing Google Sitemap in your activities:

    1. Accelerate the process of discovering and adding pages to the Google index.
    2. Quickly find Google'om changed the pages of the site.
    3. Providing a faster hit of the site in the results of Google's search results.
    4. Google's help in updating its index with fresh content, as a result of which Google users receive up-to-date and fresh content in response to their searches.

    Who should use this?

    Google Sitemaps can be used by every site owner, regardless of how many pages on the site are one or one million. But still it is necessary to use Google Sitemap to the owners of those sites whose pages undergo very frequent changes.

    Usually it happens that a certain number of pages of the site is not indexed , although the links leading to them are correctly recognized by the search robots. The reason for this is trivial - the location of links to these pages in the depth of the site, i.e. The search robot does not reach these links, accordingly does not find these pages. Avoid this problem by using Google Sitemap .

    Remember: using Google Sitemap does not give you an advantage in 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 an XML- code that you should include in each page of your site:

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

    The following is a description of each line of code:

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

    Some web pages of your site can be especially priority , because Often updated , for example, the home page of the site, the article page, so they need to assign the highest priority ...

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

    How do I create a dynamic Google Sitemap XML file?

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

    Fortunately, Google provides its own script, called the Sitemap Generator , which allows you to generate the required 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 the list of URLs , web server directories or access logs.

    To learn more about the tools Google provides for webmasters, you can here: https://www.google.com/webmasters/sitemaps/login

    Tools for generating 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 present a step-by-step plan for creating a Google Sitemap using one of the many free Sitemap generators:

    1. Go to the website http://www.sitemapspal.com and enter the address of your site in the form at the very top of the page of the site
    2. Click Submit
    3. Copy the generated for your site code and paste it into a clean text file notepad (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)
    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 box in your account
    8. Do these steps for each of your sites.

    Summary

    Google is the largest and most popular search engine in the whole Internet. Every year, millions of websites fall into the Google index, which naturally complicates the task of finding your site in SERP results. Therefore, create and start using Google Sitemap right now.

    Google Sitemap Script (php) for Static Websites

    Just completed a Google sitemap script in PHP. I had a long search for a script for static sites but found none suitable. Most scripts are incomplete and wont run on my server. I did not want to spend money after a simple thing such as 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 automatically each time you create / upload a static file on your server - so no ongoing administration needed from your side
    5. Follows the sitemap protocol specified by Google.
    6. Includes style sheet to get 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.