SITEMAP: Difference between revisions

From NikkiWiki
Jump to navigation Jump to search
Line 79: Line 79:
https://www.nicolesharp.net/wiki/analytics_for_Nicole_Sharp's_Website
https://www.nicolesharp.net/wiki/analytics_for_Nicole_Sharp's_Website
https://www.nicolesharp.net/wiki/donations
https://www.nicolesharp.net/wiki/donations
https://www.nicolesharp.net/wiki/security
https://www.nicolesharp.net/wiki/security_for_Nicole_Sharp's_Website
</syntaxhighlight></code>
</syntaxhighlight></code>



Revision as of 2023-09-05T20:56:20

[Image.]  A sitemap will help your webpages to get indexed by search engines quickly and efficiently.  Google is the most popular search engine in the world (for 2023), followed in second place by Microsoft Bing. [1] [2] [3]  Photograph depicts the corporate headquarters for Google Search in California (USA) with the Google logo decorated in the rainbow colors of the LGBT (lesbian, gay, bi, trans, et al) flag for the celebration of USA LGBT Pride Month. [4] [5] [6] [7] [8] [9]

Adding a sitemap to your website allows searchbots to find pages much faster and more efficiently, allowing them to be quickly indexed for search engines.  Sitemaps can be saved as either "/sitemap.txt" or "/sitemap.xml" and should be placed in the root webdirectory ("/"). [10] [11] [12] [13]  Using plaintext (TXT) is much faster and easier than writing extensible markup language (XML).  I recommend keeping the sitemap as plaintext, allowing the SITEMAP protocol to join the ranks of the other plaintext website protocols for ROBOTS, SECURITY, and HUMANS.

documentation

editor

As with all webtext files, you should use an advanced text editor such as Notepad-Plus-Plus (not Microsoft Windows Notepad). [14]  Files should be saved with Unix line endings and UTF-8 (Unicode Transformation Format Eight-Bit) character encoding.

canonical links

To create a sitemap, you simply make a plaintext list of each URL (uniform resource locator) for the website with one URL per line and no other content (no comments).  Only URLs for a single domain should be included — do not add URLs for subdomains or alias domains.  You should only list canonical URLs.  This means that if a particular webpage can be accessed from multiple URLs, only one URL should be listed for that webpage in the sitemap.

For example, there are many different ways to access Nicole Sharp's Homepage:

https://www.nicolesharp.net/
https://www.nicolesharp.net/index.htm
https://www.nicolesharp.net/index.html
https://www.nicolesharp.net/w/
https://www.nicolesharp.net/w/index.php
https://www.nicolesharp.net/w/index.php?title=NikkiWiki
https://www.nicolesharp.net/w/index.php?title=Main_Page
https://www.nicolesharp.net/w/index.php?title=NikkiWiki:Main_Page
https://www.nicolesharp.net/wiki/
https://www.nicolesharp.net/wiki/NikkiWiki
https://www.nicolesharp.net/wiki/Main_Page
https://www.nicolesharp.net/wiki/index

The canonical URL though is

https://www.nicolesharp.net/wiki/NikkiWiki

since all of the other URLs redirect to that URL.

MediaWiki

In Wikimedia MediaWiki, canonical URLs are provided by adding

$wgEnableCanonicalServerLink = true;

to "LocalSettings.php". [15]

no subdomains

Here are even more ways to access Nicole Sharp's Homepage:

https://nicolesharp.net/
https://www.nicolesharp.net/
https://web.nicolesharp.net/
https://en.nicolesharp.net/
https://eng.nicolesharp.net/
https://us.nicolesharp.net/
https://usa.nicolesharp.net/
https://wiki.nicolesharp.net/
https://w.nicolesharp.net/
http://www.nicolesharp.net/
http://nicolesharp.net/
http://nicolesharp.altervista.org/
http://nicolesharp.dreamhosters.com/
https://nicolesharp.dreamhosters.com/

With the exception of "https://www.nicolesharp.net/", none of these other URLs should be included in "https://www.nicolesharp.net/sitemap.txt".  All of the URLs should have the same protocol (either all HTTPS [Hypertext Transfer Protocol Secure] or all HTTP [Hypertext Transfer Protocol]) and all of the URLs should be on the same subdomain (for example, either all with "www" or all without "www").

example

The following "/sitemap.txt" example gives a compliant sitemap for "https://www.nicolesharp.net/":

https://www.nicolesharp.net/wiki/NikkiWiki
https://www.nicolesharp.net/wiki/about_NikkiWiki
https://www.nicolesharp.net/wiki/Nicole_Sharp
https://www.nicolesharp.net/wiki/license_for_Nicole_Sharp's_Website
https://www.nicolesharp.net/wiki/analytics_for_Nicole_Sharp's_Website
https://www.nicolesharp.net/wiki/donations
https://www.nicolesharp.net/wiki/security_for_Nicole_Sharp's_Website

Only canonical URLs are included, all of the URLs have the same protocol ("https://"), and all of the URLs are on the same subdomain ("www.nicolesharp.net").  Each new subdomain will need its own sitemap.

comments

Comments are not supported in the SITEMAP protocol.

ROBOTS

Once your sitemap is completed, you can add it to the Robots Exclusion Protocol to be indexed by searchbots. [16]  An example "/robots.txt" with a sitemap is given below.

User-agent: *
Disallow:
Sitemap: https://www.example.net/sitemap.txt

see also

references

  1. https://www.similarweb.com/engines/
  2. https://www.google.com/
  3. https://www.bing.com/
  4. commons:category:Google
  5. commons:category:Google logos
  6. wikipedia:Googleplex
  7. wikipedia:LGBT flag
  8. wikipedia:USA LGBT Pride Month#Recognition
  9. https://obamawhitehouse.archives.gov/the-press-office/2011/05/31/presidential-proclamation-lesbian-gay-bisexual-and-transgender-pride-mon/
  10. https://www.sitemaps.org/
  11. https://www.sitemaps.org/protocol.html
  12. https://developers.google.com/search/docs/crawling-indexing/sitemaps/
  13. https://developers.google.com/search/docs/crawling-indexing/sitemaps/build-sitemap/
  14. https://www.notepad-plus-plus.org/
  15. mw:$wgEnableCanonicalServerLink
  16. ROBOTS#SITEMAP

keywords

bots, CANONICAL, development, hyperlinks, indexing, links, ROBOTS, robots.txt, searchbots, SITEMAP, sitemap.txt, TXT, URLs, web, webcrawlers, webcrawling, webdevelopment, weblinks, WWW