Structure and Script (php) Google Sitemap
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 exist 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:
- The benefits derived from the introduction of Google Sitemap in their activities;
- Who should use it;
- How it works;
- How to create a Google Sitemap for your site;
- How to create a dynamic XML file Google Sitemap;
- Tools for generating a third-party Google Sitemap.
Benefits derived from the implementation of Google Sitemap in its activities:
- Speed up the process of finding and adding pages to a Google index.
- The rapid finding of Google changed pages of the site.
- Ensuring a faster hit site in the results of search results Google.
- Helping Google to replenish 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 are undergoing very frequent changes.
It usually happens that a certain number of pages on the site is 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:
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:
- 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
- Click Submit
- Copy the code generated for your site and paste it into a clean text notepad file (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 located)
- 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 column in your account.
- Perform these steps for each of your site.
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.
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.
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.