---
title: "Why My WordPress Website Includes Both http://https:// on Canonical Url"
description: "If your WordPress website's canonical URL includes both http:// and https://, it indicates a misconfiguration in the website's settings or a plugin/theme…"
url: "https://maksut.net/why-my-wordpress-website-includes-both-http-https-on-canonical-url/"
language: "en-US"
datePublished: "2024-12-16T01:43:23+00:00"
dateModified: "2026-09-23T20:22:21+00:00"
author: "Maksut"
---

# Why My WordPress Website Includes Both http://https:// on Canonical Url

If your WordPress website’s canonical URL includes both `http://` and `https://`, it indicates a misconfiguration in the website’s settings or a plugin/theme conflict. This issue can negatively affect SEO and user experience. Here’s how to diagnose and fix it:

---

## Why Does This Happen?

1. **Incorrect Site URL Settings**:
   - The `WordPress Address (URL)` or `Site Address (URL)` fields in your WordPress settings might be misconfigured.
   - Example: If you accidentally set it as `http://https://example.com`, the canonical URL will reflect that.
2. **Mixed Content or HTTPS/HTTP Redirection Issue**:
   - Conflicts between `http://` and `https://` caused by plugins (e.g., caching, SEO, or SSL plugins).
   - An improperly configured SSL or redirection setup can lead to this issue.
3. **Theme or Plugin Canonical Tag Misconfiguration**:
   - The theme or an SEO plugin (like Yoast SEO or Rank Math) might be generating the canonical tag incorrectly.
4. **Database Corruption**:
   - If the URL values in the database (`wp_options` table) are corrupted or incorrectly set, this can cause the problem.
5. **Hardcoded URLs**:
   - A hardcoded canonical URL in the theme or plugin files might be causing the duplication.

---

## **Steps to F**ix the Issue

### 1. Check and Correct WordPress URL Settings

1. Go to **Settings** → **General** in the WordPress dashboard.
2. Ensure both fields are correct:
   - **WordPress Address (URL)**: `https://example.com`
   - **Site Address (URL)**: `https://example.com`
3. Remove any extra `http://` or `https://` prefixes.**Tip**: Always use `https://` if your site is secured with SSL.

---

### 2. Clear Cache

If caching is enabled:

1. Clear your website cache using caching plugins like **WP Rocket**, **W3 Total Cache**, or **LiteSpeed Cache**.
2. Clear your browser cache as well.

---

### 3. Check SEO Plugin Settings

If you’re using an SEO plugin (e.g., **Yoast SEO**, **Rank Math**, or **All in One SEO Pack**):

1. Navigate to the SEO plugin settings.
2. Look for the canonical URL configuration:
   - Make sure it’s set to use the correct URL (`https://example.com`).
   - Remove any manually entered `http://https://` values.
3. Save changes and recheck the canonical URL.

---

### 4. Check for SSL Plugin Configuration

If you’re using an SSL plugin like **Really Simple SSL**:

1. Check its settings and ensure there are no conflicting redirect rules or mixed content warnings.
2. Re-run the SSL setup wizard to correct any issues.

---

#### **5. Test for Plugin Conflicts**

1. Deactivate all plugins temporarily.
2. Check the canonical URL to see if the issue is resolved.
3. Reactivate plugins one by one to identify the plugin causing the issue.

---

#### **6. Check and Update Theme Files**

- If the issue persists, your theme might have hardcoded canonical URLs:
  1. Go to **Appearance** → **Theme Editor**.
  2. Check `header.php` or similar files for hardcoded canonical tags like:` <link rel="canonical" href="http://https://example.com">` [1](#e715a704-bfcb-4e56-934f-331aa1d2307d)
  3. Replace it with:phpCopy code`<link rel="canonical" href="<?php echo esc_url(home_url('/')); ?>">`
  4. Save the changes.

---

#### **7. Correct the Database Entries**

If the issue is in the database:

1. Use **phpMyAdmin** or a database management plugin (like WP-Optimize) to inspect the `wp_options` table.
2. Look for `siteurl` and `home` options.
3. Ensure their values are correct (`https://example.com`) and free of `http://https://`.SQL Query to check:sqlCopy code`SELECT option_name, option_value FROM wp_options WHERE option_name IN ('siteurl', 'home'); `SQL Query to update:sqlCopy code`UPDATE wp_options SET option_value = 'https://example.com' WHERE option_name = 'siteurl'; UPDATE wp_options SET option_value = 'https://example.com' WHERE option_name = 'home';`

---

#### **8. Verify Redirection Rules**

1. Check your `.htaccess` file (for Apache servers) or Nginx configuration for conflicting rules:
   - Example `.htaccess` for HTTPS:apacheCopy code`<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] </IfModule>`
   - Ensure there are no `http://https://` references in the rules.
2. Test your site after updating `.htaccess` or restarting the web server for Nginx.

---

#### **9. Check for Mixed Content Errors**

Use browser developer tools to identify if there are mixed content issues or resources (CSS/JS/images) still being loaded over `http://`.

Fix these by:

1. Using relative URLs or ensuring all resources use `https://`.
2. Updating URLs in the database with a search-and-replace plugin (e.g., **Better Search Replace**).

---

### **Final Step: Test the Fix**

1. Use tools like **Google Search Console** or **Screaming Frog SEO Spider** to confirm the canonical tag is correct.
2. Re-scan your site to ensure no `http://https://` URLs remain.

1. [↩︎](#e715a704-bfcb-4e56-934f-331aa1d2307d-link)

```json
{"@context":"https://schema.org","@graph":[{"@type":"WebSite","@id":"https://maksut.net/#website","url":"https://maksut.net/","name":"Maksut — Digital Systems Builder","description":"Custom WordPress and WooCommerce development with technical SEO and AI search visibility for businesses in the UK, Europe and worldwide. Work directly with Maksut.","publisher":{"@id":"https://maksut.net/#person"},"inLanguage":["en","tr"]},{"@type":"WebPage","@id":"https://maksut.net/why-my-wordpress-website-includes-both-http-https-on-canonical-url/#webpage","url":"https://maksut.net/why-my-wordpress-website-includes-both-http-https-on-canonical-url/","name":"Why My WordPress Website Includes Both http://https:// on Canonical Url","isPartOf":{"@id":"https://maksut.net/#website"},"inLanguage":"en-US","datePublished":"2024-12-16T01:43:23+00:00","dateModified":"2026-09-23T20:22:21+00:00","mainEntity":{"@id":"https://maksut.net/why-my-wordpress-website-includes-both-http-https-on-canonical-url/#article"},"breadcrumb":{"@id":"https://maksut.net/why-my-wordpress-website-includes-both-http-https-on-canonical-url/#breadcrumblist"}},{"@type":"BlogPosting","@id":"https://maksut.net/why-my-wordpress-website-includes-both-http-https-on-canonical-url/#article","isPartOf":{"@id":"https://maksut.net/why-my-wordpress-website-includes-both-http-https-on-canonical-url/#webpage"},"headline":"Why My WordPress Website Includes Both http://https:// on Canonical Url","url":"https://maksut.net/why-my-wordpress-website-includes-both-http-https-on-canonical-url/","inLanguage":"en-US","publisher":{"@id":"https://maksut.net/#person"},"wordCount":646,"mainEntityOfPage":{"@id":"https://maksut.net/why-my-wordpress-website-includes-both-http-https-on-canonical-url/#webpage"},"author":{"@id":"https://maksut.net/#person"},"datePublished":"2024-12-16T01:43:23+00:00","dateModified":"2026-09-23T20:22:21+00:00","description":"If your WordPress website's canonical URL includes both http:// and https://, it indicates a misconfiguration in the website's settings or a plugin/theme…","articleSection":"Seo"},{"@type":"BreadcrumbList","@id":"https://maksut.net/why-my-wordpress-website-includes-both-http-https-on-canonical-url/#breadcrumblist","itemListElement":[{"@type":"ListItem","position":1,"name":"Maksut.net","item":"https://maksut.net/"},{"@type":"ListItem","position":2,"name":"Seo","item":"https://maksut.net/category/seo/"},{"@type":"ListItem","position":3,"name":"Why My WordPress Website Includes Both http://https:// on Canonical Url","item":"https://maksut.net/why-my-wordpress-website-includes-both-http-https-on-canonical-url/"}]},{"@type":"Person","@id":"https://maksut.net/#person","name":"Maksut","alternateName":["Maksut Maksutoğlu","Nebudil"],"url":"https://maksut.net/","jobTitle":"WordPress & WooCommerce Systems Builder","description":"WordPress and WooCommerce developer specialising in technical SEO and AI search visibility for businesses in the UK, Europe and worldwide.","knowsAbout":["Answer Engine Optimization","Generative Engine Optimization","AI Search Optimization","Content Strategy","Local SEO","Technical SEO","Schema.org","Entity SEO","Google Business Profile","Structured Data","WooCommerce","WooCommerce Maintenance","WordPress Development","WordPress Maintenance"],"knowsLanguage":["en","tr","fa"],"address":{"@type":"PostalAddress","addressLocality":"Istanbul","addressCountry":"TR"}}]}
```
