How to Fix Duplicate Content Issues After Migration in cPanel
Posted about 2 months ago 4.4kDuplicate Content After Migration
SEO risk: Search engines see http and https, www and non-www as duplicate.
Set Canonical URL
WordPress → Settings → General → Use https://www or non-www consistently.
301 Redirect All Variations
.htaccess → Redirect http to https and non-www to www (or vice versa).
Complete Redirect Code
Full .htaccess Redirect
RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} ^www\. [NC]
RewriteRule ^ https://yourdomain.com%{REQUEST_URI} [L,R=301]
Cloudflare Page Rules
Create page rules for *yourdomain.com/* → Always Use HTTPS and forward to canonical domain.
Verification Table
| Variation | Should Redirect To |
|---|---|
| http://yourdomain.com | https://yourdomain.com |
| http://www.yourdomain.com | https://yourdomain.com |
| https://www.yourdomain.com | https://yourdomain.com |