Why Is My WordPress Site Showing Both http:// and https:// in Canonical URLs? Here’s How to Fix It
If you’ve noticed your WordPress website’s canonical URLs containing both http://
and https://
protocols (like http://https://example.com
), you’re facing a common but problematic configuration issue. This article will explain why this happens and how to fix it, ensuring your professional WordPress themes and business WordPress themes perform optimally for SEO.
Understanding the Problem
When your canonical URL includes both protocols, it typically occurs due to:
- Incorrect WordPress site URL settings
- Plugin conflicts, especially with SEO or WooCommerce WordPress themes
- Misconfigured SSL implementation
- Theme-related issues, particularly in free WordPress themes or premium WordPress themes
Impact on Your Website
This double protocol issue can negatively affect:
- Search engine rankings
- Site Credibility
- SSL certificate functionality
- Performance of Elementor WordPress themes
- WooCommerce themes and e-commerce functionality
Common Causes
1. WordPress Settings Configuration
The most frequent cause occurs when your WordPress Address (URL) and Site Address (URL) settings in the General Settings contain incorrect protocol specifications. This is particularly common when migrating from HTTP to HTTPS or when installing professional WordPress themes.
2. Plugin Conflicts
Popular plugins, especially those used with:
- Blog WordPress themes
- Business WordPress themes
- Premium WordPress themes
- WooCommerce WordPress themes
Can sometimes conflict with your site’s canonical URL settings, especially if multiple SEO plugins are active.
How to Fix the Double Protocol Issue
Method 1: Check WordPress Settings
- Go to Settings → General
- Verify both “WordPress Address (URL)” and “Site Address (URL)”
- Ensure only one protocol is present (preferably https://)
- Save changes
Method 2: Check wp-config.php
Add these lines to your wp-config.php file:
define('WP_HOME','https://your-domain.com');
define('WP_SITEURL','https://your-domain.com');
Method 3: Database Fix
Run this SQL query in phpMyAdmin:
UPDATE wp_options SET option_value = REPLACE(option_value, 'http://https://', 'https://')
WHERE option_name = 'home' OR option_name = 'siteurl';
Method 4: Check Theme and Plugin Settings
- Temporarily switch to a default WordPress theme
- Disable all plugins
- Re-enable them one by one to identify the conflict
- Pay special attention to SEO plugins and Elementor WordPress themes
Prevention Tips
- Always use SSL certificates with professional WordPress themes
- Regularly update your WordPress core, themes, and plugins
- Use reliable premium WordPress themes from trusted sources
- Implement proper redirects when switching protocols
- Regularly audit your site’s canonical URLs
Conclusion
Fixing the double protocol issue in canonical URLs is crucial for maintaining your WordPress site’s SEO health. Whether you’re using free WordPress themes, professional WordPress themes, or specialized WooCommerce themes, ensuring proper canonical URL configuration will help maintain your site’s search engine visibility and user experience.
Remember to regularly check your site’s canonical URLs, especially after:
- Installing new WordPress themes
- Updating your SSL certificate
- Making major site configurations
- Installing new plugins or WooCommerce WordPress themes
By following these guidelines, you can ensure your WordPress site maintains clean, proper canonical URLs that benefit both users and search engines.
Need help choosing the right theme for your site? Explore our curated collection of professional WordPress themes, business WordPress themes, and premium WordPress themes to find the perfect match for your needs.