Fragment URL

Any URL that contains a # character is a Fragment URL. Or we can say, the final component of a URL that you may see is called a fragment. The snippet is preceded by a hash sign (#) and is used to indicate a specific location on a web page.

When coding a web page, designers can create anchors for specific text such as headings. When the correct snippet is used at the end of a URL, the browser loads the page and then jumps to that anchor.

Anchors and snippet URLs are often used to create tables of content on web pages to make navigation easier.

Here is an example.

The Wikipedia page on the URL is quite a long document and is divided into about 9 sections. But each entry on the page has an anchor included, and a table of contents at the top of the article includes links that allow you to jump to the different sections.

These links work by including the snippets.

You can also use these snippets directly in the address bar or as shareable links. For example, you wanted to show someone the section of that page that covers the URL.

You could simply send them the following link:

The final part will jump to the corresponding section.

What is the Use of Hash in URLs?

Using the hash symbol (#) can be very powerful for SEO. Indeed, search engines do not know how to interpret the hash!

Their understanding and indexing of URLs stop at the symbol Say! Thus, the two URLs below are identical for search engines:

unlike, which is another URL totally visible to the eyes of the engines.

The first two URLs can therefore display a single content without causing any duplicate content problem.

When to Use Hash in URLs?

There are at least 3cases in which it is highly recommended to use the hash:

1. Canonicalization

The rel = ”canonical” attribute invented by the engines at the beginning of the month respects the same principle as the hash in URLs. In fact, by using a hash, we allow the URL to be canonicalized before the hash.

This makes it possible to show the engines only one content per URL and to centralize the Page Rank on the canonical URL!

2. Affiliation

To track the URLs intended for the affiliation, it is preferable to use the hash rather than the question mark.

Ex: does not present any problem of duplicate content, on the other hand, = 1234 is a real URL pointing to the page.

It should be noted that certain tracking tools, for example, analytics, natively allow the use of hash to track certain URLs.

3. Limit the Indexing of Content

You can also use the hash to prevent the indexing of part of the content of a news page for example!

If we have a news item on 4 pages and we only want to index the first page, we can use the hash! In this way even if the Net surfers make links towards the other parts of the news, thanks to the hash in the URLs, these parts will never be in the index.

Ex: and