The “/” (slash) at the end of the site URL is called a “trailing slash”, but the same URL may or may not have a “/” at the end. There is no difference in the sites that can be viewed with either URL.
So, is there a difference in managing the site with or without this “/”?
This time, I will explain the last “/” of the URL for those who are in charge of site management.
What is the difference between with and without the trailing slash in the url?
Sites with a trailing slash (/) at the end of the URL and sites without a trailing slash (/) look the same when browsing the Internet, and are displayed on the same screen.
However, even if the screen is displayed in the same way, there is a difference on the web server where the site data is located.
On the web server, the same file will be read in the end, so the same screen will be displayed, but actually different processes are being performed.
Here, we will explain in detail what kind of movement is executed on the WEB server, and what kind of difference there is with or without “/” (trailing slash).
Differences with and without slashes
The difference between the presence and absence of “/” (trailing slash) is created in the process of the web server searching for the file.
For site viewers, the content of the site displayed is the same whether or not there is a “/” (trailing slash), so there is no difference. This is because the presence/absence of “/” is automatically normalized on the web server .
Google’s official view is that either with or without “/” (trailing slash) can be used, and the search engine processes and normalizes the presence or absence of “/” (trailing slash). It is said that there is no problem because
Therefore, you don’t have to worry about the presence or absence of “/” (trailing slash).
Differences between regular domains and subdirectories
There is no visible difference, but there is a big difference between the presence and absence of “/” (trailing slash) in the movement on the web server.
Before checking the movement of the web server, it is necessary to check the structure of the URL first.
With ‘/’ (trailing slash)
No ‘/’ (trailing slash)
In the sample URL above, the meaning of “profile” at the end differs depending on whether or not there is a “/” (trailing slash).
“/” in the URL represents the folder hierarchy.
The “profile” in the above URL with “/” points to the “profile” folder in the “company” folder.
On the other hand, “profile” at the end of the URL without “/” (trailing slash) points to the file “profile” in the folder “company”.
If https://www.sample.com/company/profile/ is specified for the web server, “index.html” in the “profile” folder (“index.htm” etc. depending on the server) different) file and display the page.
On the other hand, in the case of https://www.sample.com/company/profile , it tries to find a file called “profile”.
At this time, if the “profile” file is not in the “company” folder, many web servers automatically add “/” to the end of the URL and redirect the site display.
As a result, even if there is no slash, it will eventually read the “index.html” file and display the same screen as the site https://www.sample.com/company/profile/ (with slash). is.
In this way, the presence or absence of “/” (trailing slash) is treated as a different URL on the server, so depending on the settings, an error may occur and different content may be displayed.
The impact of the presence or absence of a trailing slash in a url on SEO
The presence or absence of “/” (trailing slash) has no particular impact on SEO.
Accessing a site without a “/” (trailing slash) will result in requesting a URL with a “/” from the server.
A long time ago, URLs with and without “/” (trailing slashes) were recognized as different sites and could result in duplicate content, but now processing is done on the server side, which affects SEO. is gone.
Google’s official announcement also indicates that there is no impact on SEO, and users do not need to worry about the presence or absence of “/” (trailing slash).
Is the trailing slash in the URL necessary after all?
As it turns out, it doesn’t matter if the URL has a “/” (trailing slash) or not.
Considering that the expression of the URL with “/” is more correct and the server does not redirect, it can be said that it is safe to standardize with “/” .
On the other hand, when inserting a URL into a business card, etc., it may look cleaner without “/”, so it’s a good idea to use it according to your preference.
Two notes about trailing slashes in urls
Here, we will explain the points you need to pay attention to when choosing whether to use “/” (trailing slash) or not.
- Unify the presence or absence of slashes when adding URLs
- Check if the server is set to redirect
These are the two points above.
It doesn’t matter whether or not you add a “/” (trailing slash) at the end of the URL, but depending on your settings, you may experience problems. Conversely, by standardizing on the correct notation, you may be able to expect a positive impact on your site.
Read Also: What Is URL Normalization?
1. Unify the presence or absence of slashes when adding URLs
With or without “/” (trailing slash) has no effect. However, since URLs with “/” (trailing slash) and URLs without “/” are different, it is safe to use the correct URL with “/” .
If there is no “/”, it will redirect to the address with “/”, which may slow down the site display. Also, there is a concern that the difference in notation with and without “/” may cause unnecessary confusion for site users.
From this point, we recommend that you basically unify with “/”.
2. Check if the server is set to redirect
With or without “/” (trailing slash), many web servers will automatically convert to “/” and redirect if there is no “/”, so there is no problem using either.
However, if the web server settings are set so that URLs without “/” are not redirected, they will be recognized as different sites and the site will not be displayed correctly.
It can be said that it is necessary to check the redirect settings of the server in order to operate the site comfortably for users .
The presence or absence of “/” (trailing slash) in the site URL is recognized as different on the web server. However, the user should not be particularly concerned because it is automatically normalized.
It’s not a big problem, but in order to eliminate possible problems, it can be said that it is safer to operate the site with a URL with “/” .
We hope that this article will help you in managing your site.