What Does the “No Canonical to HTTPS Homepage from HTTP Version” Issue Mean?
The issue “No canonical to HTTPS homepage from HTTP version” refers to a problem in which the non-encrypted version of a website does not include a canonical link pointing to the secure version.
Here’s a breakdown of what this means:
Canonical Link
A canonical link element is an HTML element that helps webmasters prevent duplicate content issues by specifying the “canonical” or “preferred” version of a web page. It looks like this in HTML: <link rel=”canonical” href=”https://www.example.com/”>.
HTTPS and HTTP
HTTPS (Hypertext Transfer Protocol Secure) is a secure version of HTTP, which uses encryption to protect data exchanged between the user’s browser and the server. Search engines prefer secure protocol and provides better security for users.
Homepage Versions
A website’s homepage can be accessed via both standard and secure protocol. For example, http://www.example.com and https://www.example.com might both be valid URLs for the homepage.
How to Check the Issue?
The first option is to check manually: right-click on the page’s blank space and choose “View page source”. Then find the link tag with the following rel=canonical attribute <link rel=”canonical” href=” https://site.com “>. Check what protocol is specified therein.
Or you can simply use a specialized tool like this one: https://codebeautify.org/source-code-viewer
The Sitechecker tool presents a focused approach to identifying and resolving issues related to the transition of URLs from HTTP to HTTPS.
By selecting the “View issue” option next to the relevant category, users can obtain a detailed list of pages that are improperly directing from HTTP to HTTPS. In the Sitechecker tool, when you delve into the “Canonical from HTTP to HTTPS” issue, you’ll not only receive a list of URLs with this specific problem, but you’ll also gain access to key insights for each URL.
For each page listed, you can see the page’s weight, which gives you an idea of its significance and size, the HTTP status code indicating the server’s response to the request for that page, and the date the issue was identified. With the convenient “View issue in code” feature, users can directly examine the source code, making pinpointing and resolving the canonical issues straightforward and efficient.
Secure Your SEO: Fix Your HTTPS Canonicals!
Discover and correct canonical links leading from HTTP to HTTPS effortlessly.
How to Fix the Issue?
To fix the issue of “No canonical to HTTPS homepage from HTTP version,” you should ensure that your website’s unsecure version correctly points to the encrypted version as the canonical URL. Additionally, it’s a good idea to implement proper redirects to further strengthen the preference for encrypted connection. Here’s a step-by-step guide:
Step 1: Add Canonical Link to HTTP Pages
- Access your website’s HTML code or CMS (Content Management System).
- Locate the <head> section of your HTML for the HTTP version of the page.
- Add the canonical link pointing to the secure version of the page.
For example, for the unsecured protocol version of your homepage (http://www.example.com), add the following in the <head> section:
<link rel="canonical" href="https://www.example.com/">
Step 2: Implement 301 Redirects from HTTP to HTTPS
Redirecting all HTTP traffic to the encrypted version ensures users and search engines always end up on the secure version of your site.
If you are using Apache (with .htaccess file):
- Open or create a .htaccess file in the root directory of your website.
- Add the following code to redirect non-encrypted connection to HTTPS:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
If you are using Nginx:
- Edit your Nginx configuration file (typically found at /etc/nginx/nginx.conf or /etc/nginx/sites-available/default).
- Add the following server block to redirect HTTP to HTTPS:
server {
listen 80;
server_name example.com www.example.com;
return 301 https://$host$request_uri;
}
- Reload Nginx to apply the changes:
sudo systemctl reload nginx
Step 3: Update CMS or Platform Settings
If you are using a CMS like WordPress, Joomla, or another platform, there are often settings or plugins to handle HTTPS redirection and canonical tags:
For WordPress:
- Install and activate an SEO plugin such as Yoast SEO or All in One SEO.
- Configure the plugin to set the canonical URL to the secure version.
- Enable HTTPS redirection through a plugin like Really Simple SSL.
Step 4: Verify Changes
After implementing these changes, you should verify that everything is working correctly:
- Check the source code of the unsecured version of your site to ensure the canonical link is pointing to the encrypted version.
- Test the HTTP URL in your browser to make sure it redirects to the secure version.
Use Sitechecker to verify that the canonical URLs are set correctly and redirects are in place.
Step 5: Inform Search Engines (Optional but Recommended)
If you have made significant changes to your site structure, you might want to inform search engines about the updates:
1. Submit a new sitemap in Google Search Console and other webmaster tools with the HTTPS URLs.
2. Use the URL inspection tool in Google Search Console to request re-indexing of key pages.
By following these steps, you can resolve the issue of “No canonical to HTTPS homepage from HTTP version” and ensure that your website is correctly indexed and secure.