Your website can open in four ways: http://domeniul-tau.ro, http://www.domeniul-tau.ro, https://domeniul-tau.ro and https://www.domeniul-tau.ro. It's best if they all lead to a single one: it's safer for visitors and clearer for Google. The SSL certificate you need is free on every web hosting plan.
What you'll get
- every visitor lands on
https://, with the padlock; - a single version of the address — with
wwwor without, as you choose — and the requested page is kept (for examplewww.domeniul-tau.ro/contactleads todomeniul-tau.ro/contact).
Before you start
- The SSL certificate is valid for the domain and for
www: on the website's page, under “Security” » “SSL certificates”, the “Certificate” column shows “Let's Encrypt”. Enhance requests the certificate for both names at once (see The free SSL certificate (Let's Encrypt)). - Decide on the version: with
wwwor without. Either is fine; what matters is that there is only one, the same everywhere. - Log in to Enhance: https://server.nbt-host.com. The names below are in English, exactly as they appear on screen. If the panel opens in another language (based on your browser language), switch it to English from the account menu, top right: “My account” » “Language”.
Part 1 — HTTPS for everyone
Enhance doesn't automatically send visitors from http:// to https://: you turn the redirect on yourself, for each domain.
- In Enhance, open “Websites” from the left-hand menu and click the site.
- In the site’s top bar, click “Security” (on a narrower screen you will find it in the “Advanced” menu).
- In the “SSL certificates” card you see the website's domains, one per row.
- On the domain's row, turn on the toggle in the “Force https” column. Enhance confirms with “Force HTTPS enabled”.
- Repeat for every domain, subdomain or alias that has a website.
From now on, http://domeniul-tau.ro and http://www.domeniul-tau.ro lead, with a permanent redirect (301), to https://domeniul-tau.ro, and the requested page is kept. https://www.domeniul-tau.ro still opens separately: part 2 takes care of it.
Part 2 — with www or without
Choose one of the options below, not both.
The “Redirects” page in Enhance doesn't help here: a redirect created there applies to the domain both with and without www, so it would send visitors into a loop (Enhance warns you with “Redirect loop”). It's meant for other domains, see “Another domain to your website”.
Option A — you have WordPress
WordPress automatically sends visitors to the address in its settings:
- Log in to the WordPress dashboard and open Settings » General (wp-admin/options-general.php).
- Under WordPress Address (URL) and Site Address (URL), enter exactly the version you chose, with
https://— for examplehttps://domeniul-tau.ro. - Save with the button at the bottom of the page.
Don't also add a www rule in .htaccess: WordPress already does the redirect, and two conflicting rules lead to “too many redirects”.
Option B — directly in .htaccess (website without WordPress)
- On the website's page, click “Files” and go into the
public_htmlfolder (or the subdomain's folder). - If the
.htaccessfile exists, open its menu and choose “Edit”. If it doesn't exist, create it with “New file”, named.htaccess, then open it the same way. Add one of the options below at the beginning of the file, with your domain instead of
domeniul-tau.ro:Without
www:RewriteEngine On RewriteCond %{HTTP_HOST} ^www\.domeniul-tau\.ro$ [NC] RewriteRule ^ https://domeniul-tau.ro%{REQUEST_URI} [R=301,L]With
www:RewriteEngine On RewriteCond %{HTTP_HOST} ^domeniul-tau\.ro$ [NC] RewriteRule ^ https://www.domeniul-tau.ro%{REQUEST_URI} [R=301,L]On the
RewriteCondline, every dot in the domain is written with a\in front of it, as in the example.- Click “Save”. Enhance confirms with “File saved”.
Another domain to your website
You also have domeniul-tau.com and want it to lead to domeniul-tau.ro? This is where you use “Redirects”:
- The simplest way: when you add
domeniul-tau.comas an alias, check “Redirect to the primary domain …” (see Subdomains and additional domains in Enhance). Enhance does the redirect for you. - For an existing alias: on the website's page, “Redirects” (if it's not in the top bar, you'll find it in the “Advanced” menu) » “Add redirect”. Leave the type as 301; for the domain, choose only the alias instead of “All domains”; leave the field after
/empty; and for the destination, enterdomeniul-tau.roafterhttps://, with no/at the end. Click “Add”. The requested page is kept: Enhance appends the path to the destination address.
The redirect then appears in the list. From its menu you can change it (“Edit”) or delete it (“Delete”).
How to check
Open a private window in your browser and try, one by one, http://domeniul-tau.ro, http://www.domeniul-tau.ro and https:// with the version you didn't choose. They must all reach the address you chose, on https://. The private window matters: browsers remember old redirects.
If something doesn't work
- “Too many redirects” (ERR_TOO_MANY_REDIRECTS). Two rules conflict: for example, WordPress set with
wwwand a rule in.htaccesspointing to the version withoutwww, or Cloudflare in Flexible SSL mode together with “Force https”. Keep a single version everywhere; in Cloudflare choose Full (strict) or switch the records to DNS only. - The “Force https” toggle is gray. The domain doesn't have a certificate yet. Sort out the certificate first (see The free SSL certificate (Let's Encrypt)).
- “Force https” is on, but the browser says the website is not secure. Under “SSL certificates”, the “Certificate” column shows “Self signed”, meaning the temporary certificate. Turn the toggle off until “Let's Encrypt” appears.
- “Redirect loop” appears under “Add redirect”. The redirect sends the domain to itself — usually because the domain field was left on “All domains” or the primary domain. Click “Cancel” and choose only the alias.
- The padlock appears crossed out or the browser says the page isn't fully secure. The page loads images or scripts over
http://. Replace thehttp://addresses in your content withhttps://(in WordPress, also check the theme and plugin settings). - The website shows “500 Internal Server Error” after you edited
.htaccess. There's a typo in the rule. Delete the lines you added, save and try again, paying attention to every character.
