How To Set Priority Of URL In Sitemap?

How to set url priority in sitemap

To set priority of URL in sitemap we write our sitemap in xml language and add optional tag that is <priority> while writing sitemap we chose priority from 0,.0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1. This priority directs to crawl which your first and which last as per priority assigned.

What is sitemap?

Sitemap is a way for the user and crawler for any website to navigate on a website to find useful and personal requirements on a particular website. When any user or crawler visits a website to find any information or data respectively, they navigate the full website but their requirement is different crawler visit for data where visitor wants information. Through sitemaps we make it easy for both to get useful information first.

There is two type of sitemap

  1. HTML sitemap
  2. XML sitemap

1.  HTML sitemap: HTML sitemap is based on user interaction while we build a website, we focus what visitors like on our website. We put all important content on top that helps visitors to navigate a website hassle-free or without wasting time visitors getting their information on the website. We focus on header and design simple and attractive.

KEY area for html sitemap is follow:

  • Logo area
  • Menu
  • Search box
  • Call to action
  • Contact details
  • Sidebar
  • Footer

2.XML sitemap: This sitemap build for crawler to consider which is an important URL on the website. URL most crawled when crawlers visit. We can also set a frequency of change that tells crawler to when content is being changed on a particular URL so crawler can revisit on set frequency to collect new data.

For example: is blog website so, there are multiple url on this website for post,category, page, image, tag among these all url important url are posts so our main objective is our post url must crawl when ever crawler visit on website then we give less priority to category, page, tag, image etc.

Learn how to set priority & change frequency in xml sitemap

Tag which is used while writing a sitemap.

<urlset>: This is mandatory tag which its open tag for sitemap file

<url>: Mandatory set tag for each url

<Ioc>:Mendetry tag to define url

<lastmod>: optional tag to show last modified data

<changefreq>: optional tag which tell when data modified and added

Valid value to changefreq tag

  • always
  • hourly
  • daily
  • weekly
  • monthly
  • yearly
  • never

<priority>optional tad we set priority value of url between 0 to 1 

Values: 0,.0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1

First we create a notepad and name it sitemap.xml. file must be in .xml


<?xml version=”1.0″ encoding=”UTF-8″?>

<urlset xmlns=”“>



 <lastmod>2020-01-01</lastmod>  (optional)

 <changefreq>monthly</changefreq>  (optional)

 <priority>0.9</priority> (optional)


Note: Here we give priority 0.9 because I want my post must be crawled on first priority when crawler visit this url that is why put value 0.9 maximum value and in changefreq tag we put value monthly it means we add content in this url “Monthly” basis. And lastmod tag put a date on content last modified.




<lastmod>20019-01-01</lastmod>  (optional)

<changefreq>weekly</changefreq>  (optional)

<priority>0.8</priority> (optional)


Note: Here we give priority 0.8 because I want my category would be crawled on post url and in changefreq tag we put value “weekly” it means we add new post in this category on a weekly basis in this url.




 <lastmod>20019-01-01</lastmod>  (optional)

  <changefreq>monthly</changefreq>  (optional)

priority>0.6</priority> (optional)


Note: Here we give out less priority compared to post and category url it means we want this image to be crawled after post and category. And changefreq “Daily” means  we modify this image on a daily basis.




 <lastmod>2005-01-01</lastmod>  (optional)

<changefreq>yearly</changefreq>  (optional)

<priority>0.8</priority> (optional)



Note: Here we give out less priority compared to post,category & image url it means we want this tag to be crawled after post, category & image. And changefreq “Never” means  we will never modify the tag.

<lastmod>, <changefreq> and <priority> tag are optional depending on if we to add or not.