WordPress WWW & Non-WWW, HTTP & HTTPS Both Indexed Fix
Quick Triage: Which Variant Is Breaking Your Site?
Your site is currently serving the same content from multiple URLs, leading to diluted SEO authority and wasted crawl budget. Before diving into the fixes, let's pinpoint the exact symptom you're seeing in search results or your analytics. This will guide us to the most effective solution.
You see both http://example.com and https://example.com indexed.
This indicates an incomplete or misconfigured SSL certificate setup, or a lack of proper HTTP to HTTPS redirection. Search engines are indexing both secure and insecure versions of your pages, leading to WordPress duplicate content.
You see both www.example.com and example.com indexed.
This is a classic WordPress duplicate content issue where your server or WordPress configuration isn't consistently redirecting to a single preferred domain (either WWW or non-WWW). This directly impacts your "wordpress www and non www both indexed" problem.
You see both example.com/page/ and example.com/page indexed.
This points to an inconsistent trailing slash configuration. WordPress, server, or CDN rules are not uniformly enforcing or removing the trailing slash, causing search engines to see two distinct URLs for the same content. This is a common "wordpress with and without trailing slash both indexed" scenario.
All of the above are showing up in Google Search Console or site audits.
Your site has a combination of fundamental URL canonicalization issues. This requires a comprehensive review of your server configuration, WordPress settings, and potentially CDN rules to consolidate all variants into a single, preferred URL.
}Root Causes: Why Your WordPress URLs Are Fragmented
Understanding the underlying technical reasons is crucial for a permanent fix. These aren't just "settings issues"; they often stem from specific server configurations, plugin conflicts, or a lack of proper canonicalization directives.
CAUSE 01
Incorrect WordPress Address Settings
The most common culprit. Your WordPress Address (URL) and Site Address (URL) in Settings > General might be set inconsistently (e.g., one with WWW, one without, or one HTTP, one HTTPS), or they were changed without proper server-level redirects being implemented. This tells WordPress to serve content from the specified URL, but doesn't force external redirects.
CAUSE 02
Missing or Misconfigured Server Redirects (.htaccess / Nginx)
Even if WordPress settings are correct, the web server (Apache via .htaccess or Nginx configuration) must enforce the canonical URL. Without explicit 301 redirects for HTTP to HTTPS, WWW to non-WWW (or vice-versa), or trailing slash consistency, the server will happily serve content from multiple variants, causing "wordpress http and https both indexed" and "wordpress www and non www both indexed" issues.
CAUSE 03
CDN or Load Balancer Configuration Errors
If you're using a Content Delivery Network (CDN) like Cloudflare or a load balancer, their settings can override or interfere with WordPress and server-level redirects. Incorrect SSL modes (e.g., "Flexible" SSL on Cloudflare without a server-side SSL certificate) or misconfigured "Always Use HTTPS" rules can prevent proper canonicalization, leading to "wordpress http and https both indexed" problems.
CAUSE 04
Plugin Conflicts or Incomplete Migrations
Certain SEO plugins or migration tools, if not configured correctly, can sometimes generate incorrect canonical tags or fail to update all internal links. This can lead to a situation where the server redirects are in place, but internal links or canonical tags still point to non-preferred versions, confusing search engines. This is especially true after migrating from a staging site to live.
}Fix Steps: Reclaiming Your Canonical Authority
These steps are ordered by common impact and ease of implementation. Always back up your site before making file or database changes.
Verify WordPress General Settings
Log into your WordPress admin dashboard and navigate to Settings > General. Ensure that both the WordPress Address (URL) and Site Address (URL) fields are set to your preferred canonical URL. This means consistently using either WWW or non-WWW, and always HTTPS. For example, if you prefer HTTPS and non-WWW, both fields should be https://example.com, not http://www.example.com or https://www.example.com.
WordPress Admin > Settings > General
✓ Critical first check. ~2 minutes.
Implement Server-Side 301 Redirects (.htaccess for Apache)
This is where most "wordpress www and non www both indexed" and "wordpress http and https both indexed" issues are resolved. Access your site's root directory via FTP/SFTP or your hosting file manager. Edit the .htaccess file. Add the following rules above the # BEGIN WordPress block to force HTTPS, non-WWW, and remove trailing slashes (adjust if your preference is WWW or to keep trailing slashes).
# Force HTTPS
RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} ^www\. [NC]
RewriteRule ^(.*)$ https://example.com/$1 [L,R=301]
# Remove Trailing Slash (adjust if you prefer to keep it)
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
⚠ Backup .htaccess first. Incorrect rules can break your site. ~10-15 minutes.
Verify Nginx Configuration (if applicable)
If your server runs Nginx, .htaccess files are ignored. You'll need to configure 301 redirects within your Nginx server block. Locate your site's Nginx configuration file (often in /etc/nginx/sites-available/your-site.conf or similar). Add these rules to enforce HTTPS and non-WWW. Consult your hosting provider if unsure about Nginx configuration.
server {
listen 80;
server_name www.example.com example.com;
return 301 https://example.com$request_uri;
}
server {
listen 443 ssl http2;
server_name www.example.com;
return 301 https://example.com$request_uri;
}
server {
listen 443 ssl http2;
server_name example.com;
# ... rest of your server block for example.com ...
# To remove trailing slash:
rewrite ^/(.*)/$ /$1 permanent;
}
⚠ Requires root access or hosting support. ~15-30 minutes.
Check CDN/Cloudflare Settings
If you use a CDN, log into its dashboard. For Cloudflare, check SSL/TLS > Edge Certificates to ensure "Always Use HTTPS" is enabled and your SSL/TLS encryption mode is "Full (strict)" or "Full", not "Flexible". Also, review Rules > Page Rules for any conflicting redirects. Incorrect CDN settings are a frequent cause of "wordpress http and https both indexed" issues, especially if the origin server is not properly configured for HTTPS.
Cloudflare Dashboard > SSL/TLS > Edge Certificates & Rules > Page Rules
✓ Essential for sites behind a CDN. ~5-10 minutes.
Update Internal Links and Canonical Tags
Even with redirects, outdated internal links can waste crawl budget. Use a plugin like "Better Search Replace" to update old HTTP or WWW links in your database to the canonical HTTPS, non-WWW version. Also, verify that your SEO plugin (e.g., Yoast SEO, Rank Math) is generating correct canonical tags. These tags tell search engines the preferred version of a page, helping resolve "wordpress with and without trailing slash both indexed" and other duplicate content issues. For specific duplicate content types like archive pages or WooCommerce products, canonical tags are often the primary solution.
Database search & replace:
Search: http://www.example.com
Replace: https://example.com
SEO Plugin Settings:
Yoast SEO > Tools > File editor (for robots.txt)
Rank Math > General Settings > Links (for canonicals)
✓ Prevents internal link confusion. ~15-30 minutes.
Submit Updated Sitemaps and Request Reindexing
After implementing redirects and updating internal links, generate a fresh sitemap from your SEO plugin. Submit this new sitemap to Google Search Console (and Bing Webmaster Tools). Use the URL Inspection tool in GSC to fetch and render a few key pages, then request reindexing. This accelerates the process of search engines discovering your canonical URLs and de-indexing the duplicates.
Google Search Console > Sitemaps > Add a new sitemap
Google Search Console > URL Inspection > Request Indexing
✓ Speeds up search engine recognition. ~5-10 minutes.
Our Process: How We Eliminate URL Duplication
When you entrust WebFixHQ with your WordPress URL canonicalization issues, we don't just apply generic fixes. We follow a precise, multi-point diagnostic and implementation strategy to ensure every variant is properly consolidated.
- Initial Scan & Audit: We begin with a comprehensive crawl using tools like Screaming Frog SEO Spider or Sitebulb to identify all indexed URL variants (HTTP, HTTPS, WWW, non-WWW, trailing slash, no trailing slash). This gives us a clear map of the problem's scale.
- Server Configuration Deep Dive: We meticulously examine your web server's configuration files (
.htaccessfor Apache,nginx.conffor Nginx) to identify missing or conflicting redirect rules. We implement robust 301 redirects to enforce your chosen canonical URL structure. - WordPress Core & Database Review: We check your Settings > General for correct WordPress and Site URLs. If necessary, we perform direct database updates (
wp_optionstable) to ensure these are consistent. We also audit for outdated internal links that might still point to non-canonical versions. - CDN & DNS Verification: For sites using Cloudflare or other CDNs, we log in to verify SSL settings (e.g., "Full (strict)" SSL mode), page rules, and ensure no CDN caching or configuration is preventing proper redirects or canonical URL delivery. We also check DNS records for any conflicting A or CNAME entries.
- Canonical Tag & Robots.txt Audit: We verify that your SEO plugin is generating correct
<link rel="canonical">tags for all pages. We also review yourrobots.txtfile to ensure no critical URLs are accidentally disallowed, which could hinder proper indexing. - Post-Fix Validation & Monitoring: After implementing changes, we perform another crawl to confirm all redirects are working correctly (checking HTTP status codes for 301s). We monitor Google Search Console for de-indexing of duplicate URLs and improved crawl statistics.
This thorough approach ensures that issues like "wordpress www and non www both indexed" and "wordpress http and https both indexed" are not just patched, but permanently resolved, restoring your site's SEO integrity.
Why WebFixHQ for Your WordPress Canonical Fixes?
You're losing traffic and authority every day your site serves duplicate content. Generic advice won't cut it. You need an engineer who understands the intricate dance between WordPress, your web server, and search engine crawlers.
We've resolved hundreds of these exact issues, from simple .htaccess misconfigurations to complex CDN and database conflicts. Our expertise isn't just theoretical; it's built on years of hands-on problem-solving for sites just like yours.
We provide a direct, technical solution without the guesswork. Our goal is to consolidate your URL variants, restore your SEO authority, and get your site back to performing optimally, quickly and efficiently. Don't let duplicate content erode your online presence any longer.
Stop Losing SEO Authority Now.
We fix WordPress WWW/non-WWW, HTTP/HTTPS, and trailing slash duplicate content issues fast.
Get Your Site Fixed →FAQ
Common questions
How do I check if my WordPress site has WWW and non-WWW indexed?
How long does it take to fix www/non-www or HTTP/HTTPS duplicate content?
Can I fix WordPress HTTP/HTTPS and trailing slash issues myself?
What is the cost to fix WordPress URL duplicate content issues?
My site is behind Cloudflare, can that cause HTTP/HTTPS duplicate content?
Site down right now?
Real humans. No ticket queue. No waiting rooms.
Most critical fixes resolved in the same session.