In this tutorial, we will see how to find a number of pages on any website in 2 different ways.
There are often times when we want to sneak into the competitors and want to know the number of pages their websites have or for any other reasons that we have.
There are 2 different ways in which we can find the count of pages.
Using Google search engine to find the number of pages on any website
All we have to do is type site:https://domain.com, for example site:https://learnersbucket.com and this will return all the pages that Google has indexed.
As a search engine, Google indexes pages to show the appropriate results whenever anything is queried. We can leverage this and find the number of pages that the website holds.
In the response, we are able to see the result count.
Using sitemap.xml
Google results cannot be reliable as it often indexes the pagination page and the categories and tag archives as well.
If you want to get the exact page counts then the best way is to use the sitemap.xml, a file that is placed in each website’s root that contains all the links to the website pages.
This is added for the search engine so that they can better index the website.
It is often named as
- https://domain.com/sitemap_index.xml
- https://domain.com/sitemap.xml
- https://domain.com/sitemap