Structure and Script (php) of the Google Sitemap
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:
- Benefits resulting from the implementation of Google Sitemap in their activities;
- Who should use this;
- How it works;
- How to create a Google Sitemap for your site;
- How to create a dynamic Google Sitemap XML file;
- Tools for generating a third-party Google Sitemap.
The benefits of implementing Google Sitemap in your activities:
- Accelerate the process of discovering and adding pages to the Google index.
- Quickly find Google'om changed the pages of the site.
- Ensuring a faster hit of the site in the results of Google's search results.
- Google's help in updating its index with fresh content, as a result of which Google users get the latest and up-to-date content in response to their searches.
Who should use this?
Use Google Sitemap can each site owner, regardless of how many pages on the site are one or one million. But still it is necessary to use Google Sitemap owners of those sites whose pages are undergoing 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 is banal - 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 on blogs.
Below is an example of an XML- code that you should include in each page of your site:
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 your 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 of the 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.
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:
- 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
- Click Submit
- Copy the generated for your site code and paste it into a clean text file notepad (notepad)
- Save this text file as sitemap.xml
- Upload this file to the root directory of your site (where the home page of the site is)
- 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
- Now open your Google Sitemap account and add this path (from step 6) to the appropriate box in your account
- Do these steps for each of your sites.
Google is the largest and most popular search engine on the Internet. Every year, millions of websites fall into the Google index, which naturally complicates the task of finding your site in search results (SERP). 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. 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.
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
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.