0
votes

This is a generic question;

When you Google a hex code let's say #abcdef you'll be shown with thousands of results each similar to https://example.com/abcdef

Since there are about 16 million hex codes it isn't practical for any website to create 16 million pages i.e., one for each color code.

Similarly, when you search for a flight from let's say LA to Seattle you'll be shown with links like these https://example.com/flights/lax/sea/los-angeles-to-seattle

It they use JavaScript, then the content would be dynamically created when they click on the link. so, the content in the description section of a search should be fed through sitemaps.

Since a sitemap can have only 50,000 URLs in one sitemap. How do they manage to map all the colors and flight information via search to their website?

Few options passed my mind, but I dunno which exactly.

Can anyone explain how such links are created?

1
The page is created dynamically, but at server side. Google then crawls pages, if a page get's indexed there is likely another link to such page. Sitemaps are not really used, or required anymore. - Keith
Can you explain how? One doubt, If the page is created dynamically then there must exist like 16 million pages if i'm correct? Won't that be too many pages on a server. - Nithin
If the page is created dynamically then there must exist like 16 million pages No, dynamically mean there created dynamically, otherwise they would be static pages. In the url there will be some sort of reference for the server side to generate the page dynamically.. eg.. "https://example.com/abcdef" the server side will extract the abcdef and then render the page. - Keith
Oh okay, understood. Are there any references which are available which you know of which are used to create such links. I tried searching GitHub but didn't really know what to search for. - Nithin
The term is called dynamic routing,.. The best way maybe to understand is to get your hands dirty,. Express with node.js is a nice framework for doing such things, you could say for example create a webpage called reverse, that with a url like /doreverse/pink, could maybe render a page with the word knip. A kind of hello world for dynamic routing. More info here on doing routing with express -> expressjs.com/en/guide/routing.html - Keith

1 Answers

1
votes

You can declare more than 1 sitemap in your robots.txt, each containing 50 000 entries. Each entry's URL can point to one color. The Google bots will activate the Javascript for each given color when visiting the URLs in each sitemap. The server only needs to maintain 1 page with its Javascript.