Tips for creating and fixing time-date format issue on google sitemap.xml
published at:11/1/2009, Tutorials, HTML & SEO,
published by: she7ata
Salam Alikum and Peace be upon you...
Sitemap.xml is that simple XML data file that has the mostly the entire site links you liked search engines like google to crawler and keeps it so it would appear on searching and indexing your site.
While I was creating and developing my own dynamic blogging system 'she7ata's-blogs', I liked really to create the sitemap.xml dynamically, and that's how I faced some issues like the time/date format and other issues.
I thought it was really an easy task, but I've spend couple of hours fixing things and returning back to sitemap protocol to know what is the problem
Here is a simple and quick tips for you to quickly generating a sitemap.xml file.
First, here is a simple xml file sample, maybe you can copy and past for quick start.
<?xml version="1.0" encoding="utf-8" ?>
<url>
<loc>http://she7ata.com/blogs/categories/2/Islamic.html<loc>
<lastmod>2009-10-17T14:57:49+02:00</lastmod>
<changefreq>weekly</changefreq>
<priority>0.8</priority>
</url>
First, …
<?xml > SHOULD START FROM LINE 0
first of all, I've encountered that problem, and I did not know what's wrong, but after along time of testing, I discovered that if you left one line before the xml definition or header, your browser will never recognize or display your sitemap.xml file formatted as it should be, the same for RSS and ATOM xml feeds!.
Remember, that every URL has 4 basic elements, Loc or Location, last-modified date, change frequency and priority .
Priorities is very and till now I did not see it has a effect on anything, but you should have a value from 0 to 1.
Location is the location of the document or the file you're indexing.
And finally the date-format should be on specific scheme like
yyyy-mm-ddThh:mm:ss+GTM
years-month-day(T)hour+GTM
example
2009-10-17T14:57:49+02:00
Please note that you will need to do some checking before generating date, because google will not accept a date like 2009-10-5T…. it should be 2009-10-05T…. that means you will check the length of the string representing the day and month and add one more Zero on the left hand side incase the length is one (one digit)
Please notice the google sitemap.xml invalid date error screenshot below.
http://www.she7ata.com is not equal to http://she7ata.com for google !
DO NOT POST LINKS OUTSIDE YOUR DOMAIN NAME
Google would stop processing your posted sitemap.xml file if they notice that you're using a external link, even if you tried to post a link from within the same domain but with or without the www, google will give you alert, you should use EXACTLY the same domain you have used on your 'google webmaster tools' account.
Sitemap resources.
- For those people who liked to understand and read more about sitemap.xml protocol, please try http://www.sitemaps.org, also http://www.google.com/webmasters/sitemaps/
- For those people who doesn't like the codes and like to generate a sitemap.xml here is a link for a website with friendly interface that does the hard part and generate the sitemap.xml for you http://www.xml-sitemaps.com
- If you liked to post your sitemap to google, you really should have a free account on the website master tools, please try the following link. http://www.google.com/webmasters/start
- The last thing I advice you really to use google analytical to view your site statistics and traffic. http://www.google.com/analytics
Hopefully this quick and short tips are helpful and valuable In Shaa Allah.
Thanks for your time :-)
Have fun.
categories
» recent posts
- Send And Upload Binary Bytes or Image from Flash with ActionScript 2.0
- Designers salaries in Egypt 2011
- Download logos directly, vector-logos.com site hack
- Etisalat Smart Net Router Type
- Unlock your Windows Mobile Without Touch Screen
- How to Bypass and Skip Calibrate or Align Screen on WM 6.5
- China phone folder structure
- Panasonic KM-MB1900CX Driver Download For Windows
- ماذا تعرف عن حياة الديزاينر!؟، بعض الخواطر
- Microsoft Open Door Event 2010, Egypt
� recent replies
- "Ahmed Khattab :
Kalamk MSA to7fa w kolooo sa7 :) MSA bgd and yoour work MSA is Great keep it up :)" - "ahmed :
When mymobiler connected to my phone, it tries to run an app that is unsigned and I've to press "YES ..." - "Tarek :
brilliant!! enta 2olt 7agat kteer awi kont 3ayz 2a2olha .. ana 7ases en ana elly kateb :D keep it ..." - "محمد مصطفى :
جزاك الله خيرا اللهم يسر لى الزواج ولجميع شباب المسلمين اللهم أميـــن ." - "Devilocke :
When I try to connect to the windows mobile device center, I get the message "Your device is current ..."
COMMENT(S)
ADD COMMENT