Pick one preferred version of your site, such as https with www, and 301 redirect every other version to it in a single step. Without that, your site can exist at four addresses, splitting signals and confusing search engines. A correct setup means any variant a visitor types lands on one clean URL.
The four versions to control
- http://example.com
- http://www.example.com
- https://example.com
- https://www.example.com
Choose one as the preferred version. Which you pick matters less than being consistent.
Redirect in one hop
Each other version should send visitors straight to the preferred address with one 301. Chains such as http to https and then non-www to www add delay and risk. Learn more in redirect chains and loops.
Not sure if this is hurting your site?
Get the fixes that matter most, in priority order.
Server rules
The rules usually live in your server configuration or an htaccess file. The htaccess redirect generator writes the code for common cases, so you do not need to hand-edit it from scratch.
Test every version
Enter each of the four addresses into the redirect and status code checker. Each should show a single 301 to the preferred address and a final 200.
Support it with other signals
- Use canonical tags that match the preferred address. See what a canonical tag is.
- Update internal links, sitemaps and profiles to the preferred version.
- Fix insecure resources after moving to https, using HTTPS and mixed content fixes.
Frequently asked questions
Is www or non-www better?
Neither is better for rankings. Choose one and keep it.
Do I need to tell Google?
Correct redirects and canonicals are the main signals. Also submit the right version in Search Console.
Next steps
If your site answers on several addresses, contact me here for a technical fix.
More in this series (redirect questions): start with Free Redirect and Status Code Checker, then explore:
Request received
Thank you! Saad will contact you within the next 24 hours.
Keep an eye on your phone and inbox.
