Did you ever put capital letters in your URL? If yes, do you know that the case sensitivity of URLs affects the SEO rankings of your website?
Yes, case sensitive URLs affect your website's ranking and SEO. When your website serves the same content for different URLs, for eg:
As you can see in the above URLs, one of them has the blog URL in small letters white the other blog URL has capital letters.
And getting duplicate content is definitely bad for SEO. In some cases, it results in Google penalties. Because it is considered spam by the Google bots.
When you are creating an SEO-friendly URL structure for your website, the case sensitivity of URLs has to be kept in mind. A lot of the URLs leading to the same content can be tagged as spam on Google.
Effects of Case Sensitive URLs to-the-point
Your URL can be anything related to the content of the page. The short and to-the-point kinds of URLs are much better.
But if you are using a system where capital letters in your URL lead to the same page as the small letters, then you got a problem.
- Your content can be tagged as duplicated content. This is harmful to SEO.
- The page you want to show for that URL might not show up in search engine ranking results. Instead, the other page might show up that has the same URL but in capital letters.
If a different page shows up on search engine rankings that have no content or a different content because of the case sensitivity of URLs, then you are also losing traffic.
This is why the SEO experts say that you have to get a strict case sensitive policy for your website. Either put all URLs in small letters or put in capital letters.
Will I get a Google penalty for using case-sensitive URLs?
Most probably not, because Google bots are smart enough to compare the content and then select the best content for your website.
This is called canonicalization. In this process, Google takes all URLs that lead to the same page and selects one of them as a canonical URL.
This canonical URL is considered to be the original URL with original content. All other URLs with the same content will be ignored.
In simple terms, a canonical URL means the original URL for Google spiders.
Here is a short video with John Mueller, a Google search advocate, explains this himself.
Here John Mueller says clearly that URLs with small letters and URLs with capital letters will be treated differently by Google. And if they have the same content, then canonicalization will be done by the Google bots.
Now if you want a more detailed answer for this, Google docs will be your best source of information: https://developers.google.com/search/docs/advanced/crawling/consolidate-duplicate-urls?hl=en
How to set Canonical URL in SEO?
Some also call this canonicalization SEO. There are a few good ways to use canonical URLs. Or, you can also do a redirect using a good script or plugin on your website. Let's take a look at the best ways to set a canonical URL and redirections.
link rel="canonical" href="https://underwp.com/digital-marketing-services/"
Setting a canonical link or tag will improve your SEO. This link is placed inside thetags.
This link is to be placed on all the duplicate pages directing towards the original URL. The original or canonical URL indicated here will be the one indexed and ranked by Google.
If you happen to design the same content but for mobile devices, then you can use the rel=”alternate” tag in place of rel=”canonical” in the above example.
link rel="alternate" href="https://underwp.com/digital-marketing-services/amp/"
This is the same URL but the AMP version of it. We direct the Google crawlers that this is the alternate version for mobile devices.
If your website is too big and has lots of pages to fix one by one with the above method of HTML tags, then you can use this redirect method.
With this method, you can write up a simple PHP or JS script to redirect all the specified URLs to the canonical URL.
https://underwp.com/index.html https://underwp.com/home.html https://underwp.com/
In the above example of links, you can select one canonical URL to which the other two URLs will redirect. We go with the simplest URL of all.
Since we use WordPress as our CMS, this is easy to do. Just go to your WordPress dashboard > Settings > Reading. Select your favorite page as Homepage selection under Your homepage displays option.
For other pages on WordPress, you can use one of the many free plugins from the WordPress repository. https://wordpress.org/plugins/tags/redirect/
We use RankMath on most of our websites, this also has an option of Redirection in their menu.
The benefit of using the Rank Math plugin is that you can also select the type of redirect you want for that URL.
If you don't know the type of redirects, do refer to our SEO terms guide.
This type of redirection is very beneficial for SEO. You can tell the search engines if this redirection is temporary or permanent.
If you are using Apache as your server for serving the files for your website, there is another easier way without installing a plugin or special script.
You can use the power of the .htaccess file. This file is referred to by Apache before going to the URLs of your website. So if you direct here how to go for a specific URL, then it will immediately serve the correct URL without calling the PHP process.
Redirect 301 "https://underwp.com/index.html" "https://underwp.com/home.html"
A simple redirect directive looks like the above code.
In this directive, you are saying to Apache to redirect index.html to home.html. Whenever someone types yourwebsite . com/index.html they will be redirected to yourwebsite . com/home.html
A lot more can be done with the Redirect directive in .htaccess of Apache. For more information, you can check this guide.
With the usage of regex, you can also make your uppercase letters of URL lowercase. In short, you can remove the case sensitivity of the URLs. This can be done for the whole website with this method.
It is always a good practice to have an updated sitemap on your website. And this website has to be submitted to Google Search Console.
When you submit this sitemap with the right URLs, the Google bots will only index those URLs specified in the sitemap. If the bots find any other page with a different URL but the same content, they will prefer the URL stated in Sitemap.
This is why it is a good practice to submit sitemaps to Google. Always keep your sitemap updated.
If you are using WordPress, then most of the SEO plugins like Rank Math will do this for you. Every time you post new content on your WordPress website, these plugins will update the website's sitemap and keep it alive.
Canonical URLs sound complicated but in simple terms, they are the original URLs of your website. These pages carry the content that you want to show on the search engine.
They are not difficult to set either. You can use the .htaccess method we wrote above if the URLs quantity is huge for your website. Or go with canonical tag in HTML links.
The best way is to go with WordPress plugins if your website is on WordPress. It will also help in doing good SEO.
The uppercase URLs or case sensitive URLs do not affect your SEO directly. But they do indirectly. And if you ignore these, then the chances of getting a penalty from Google increase.
This is why it is considered a good practice among SEO's to define canonical URLs. It prevents the possibility of SEO accidents when your site grows.
Let us know in the comments below if you have any questions related to canonicalization or canonical URLs, we would love to answer them.