The SEO view

Trailing Slash and URL design

Contact us!

There are several ways to define the URL of a page. This is partly dependent on the store or CMS that is used for the domain. Which possibilities there are, what to consider in each case and what the recommendation of the SEO experts of diva-e is, you will learn in the following.

Variations of the URL design

Many paths lead to the website, here are a few examples: 

  • https://example.de/content.html 

  • https://example.de/content.htm 

  • https://example.de/content.php 

  • https://example.de/content.jsp 

  • https://example.de/content/

  • https://example.de/content 

  • https://example.de/2024/content.htm 

  • https://example.de/?siteid=51 


It is important to decide on one variant and to follow it through consistently. Using different URL patterns under one domain confuses the user and in the end also complicates the analysis and reporting by SEO tools. Once you have decided on a variant, make sure that the other possible URL patterns respond with an HTTP 404 code.

What to consider in URL design?

There is no right or wrong. Google and other search engines can handle all variants. Users also know these different URL types. From a usability point of view, the last variant with the generic URL parameter siteid=51 should be avoided, as it is meaningless and cannot be interpreted by users. 

It is important to stick to one URL pattern (consistency). Visually, it may be nicer to do without a file extension (.html, .php, etc.), as this has no informative purpose for users. In addition, a page should always be accessible only under exactly one URL. Ideally, URLs should also not be too long, so that they remain manageable and users can quickly grasp them and assign them to content. 

It is not only wrong, but also dangerous, if the same page can be accessed under the following URLs, for example: 

  • https://example.de/content/ 

  • https://example.de/content


The first variant has a so-called trailing slash. While in the browser it only looks like an additional slash at the end, for search engines it is two completely different URLs, which are treated as such.  

From an SEO perspective, it is therefore essential to avoid having the same content available under different URLs. In addition to the duplicate content problem, this also results in a division of the traffic on several pages, which makes a good ranking even more difficult due to the mutual cannibalization. The link power of the backlinks also suffers from the splitting.

Our SEO recommendation: Use trailing slash

We recommend the variant with trailing slashes and without file extension. You save space in the URLs, because they become a bit shorter and you can very easily build a logical and traceable URL hierarchy.   

Example:  


Another big advantage is that directories in SEO tools can always be evaluated in the same cluster (in this example "mobile").

Note on the conversion of URLs

URL changes are always associated with ranking risks, as Google must first capture the new URLs and evaluate and incorporate the new URL structure. Therefore, changes to URLs should be made with caution. A change is recommended if the current setup causes problems or a general restructuring of the domain is planned.

Special case relaunch

When relaunching the page, you should avoid changing the URL design if possible. Since Google already knows the URLs of the page and crawls them regularly, it is easier to get the content into the index after a relaunch. If URL structures are changed, first of all you have to create redirects and be sure that they work 100%. Secondly, Google has to re-crawl the entire page, recalculate the internal link graph and also follow a lot of redirects. Accordingly, it can take longer until all new content ends up in the index. However, if you have relied on poorly readable or cryptic URLs before the relaunch, this can of course not be avoided.

The problem with the trailing slash in SEO

Basically, the trailing slash only makes clear that it is a directory. If it is missing, this indicates a file. In search engine optimization, setting the slash has far-reaching consequences: If the same URL exists once with and once without a trailing slash, the crawler indexes both pages equally and evaluates them as duplicate content if necessary, which leads to ranking losses. You should check your page to see what is delivered on the one hand with trailing slash and on the other hand without trailing slash for the same URL. 

Ideally, the unwanted variant (i.e. without slash) responds with a 301 redirect to the wanted variant (with slash). This redirect rule should be set up as a general rule for the entire domain on the server side to save manual effort. The 301 redirects to the default URL variant help especially for link power inheritance, if there are also backlinks pointing to URLs without trailing slash. 

Note: Internally, only URLs of the standard variant should be linked. Otherwise, the crawl budget suffers if the crawler regularly encounters internal redirects.

Divergent content: ok for Google, but not for the user

What happens if different content is available under the URLs with and without a slash? This is not a problem in terms of indexing, but the user experience suffers. Google therefore recommends not to create any confusion and to avoid such constellations.

301 redirects and canonicals

If there are several URL variants with and without trailing slashes, as is often the case with online stores, it is recommended to permanently forward to one version using the 301 status code in order to avoid multiple indexing.  

You should only use the Canonical tag as a last resort if 301 redirects are not possible for a specific reason. Since both URL variants continue to exist with a Canonical Tag, Google has additional effort when crawling the page, which is reflected in the crawl budget. Also, it can sometimes take several weeks for Google to process Canonical Tags.   

For root URLs, the trailing slash is irrelevant. The slash is usually appended automatically by the web server and a redirect is set up. Accordingly, search engines do not distinguish between https://beispiel.de and https://beispiel.de/. Here, only a small loss of speed may occur due to the redirection.  

You should use the preferred version consistently for all internal links. The consistency of 301 redirects can be checked in the Google Search Console.

MVV
diva-e took care of the integration of a commerce system into the SAP landscape and developed a self-service portal for customers.
Weleda
diva-e begleitet Weleda seit mehreren Jahren auf dem Weg der digitalen Transformation. Als großer Meilenstein der Digitaloffensive ging im Februar 2024 der Online-Shop in Deutschland live.
ALDI SÜD
dmTECH
diva-e and dmTECH set new standards in software development and digital consulting.
Boards & More Group
mit Composable Commerce auf die Erfolgswelle
Schott
diva-e creates a unique B2B ordering experience through the online platform of the global glass market leader.
Vergölst
diva-e gets Vergölst's customer approach rolling by optimizing existing customer contact with Adobe Campaign.
Talanx
diva-e mapped the entire digital value chain in the project with the Talanx Group for the relaunch of the corporate website and the new career portal.
STAUFF
diva-e develops a scalable and future-proof architecture and integrates it into the already existing backend systems.
Hertha BSC
diva-e developed a new state-of-the-art website with emotional design for Hertha BSC.
Klöckner & co
diva-e guides steel giant Klöckner through digitalisation and realises online shops with marketplace function.
FC Bayern Munich
Digital Champions League: The German championship record holder wows fans worldwide with tailor-made digital experiences.
EDEKA
Online marketplace for groceries: We are creating an adaptable platform for the retail giant EDEKA Nord
weleda logo
Gemüseabteilung in einem Supermarkt
Logo ALDI Süd
Kitesurfer auf dem Meer
Boards & More Group Logo
Logo von Talanx