Choose a plan

Redirect to HTTPS and www

Send visitors to https:// with Force https in Enhance and pick a single address, with or without www: from WordPress or from .htaccess.

  • Updated
guide · ssl and redirects
Steps
12
Reading time
6min
Sections
7
Start the guide

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 www or without, as you choose — and the requested page is kept (for example www.domeniul-tau.ro/contact leads to domeniul-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 www or 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.

  1. In Enhance, open “Websites” from the left-hand menu and click the site.
  2. In the site’s top bar, click “Security” (on a narrower screen you will find it in the “Advanced” menu).
  3. In the “SSL certificates” card you see the website's domains, one per row.
  4. On the domain's row, turn on the toggle in the “Force https” column. Enhance confirms with “Force HTTPS enabled”.
  5. 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:

  1. Log in to the WordPress dashboard and open Settings » General (wp-admin/options-general.php).
  2. Under WordPress Address (URL) and Site Address (URL), enter exactly the version you chose, with https:// — for example https://domeniul-tau.ro.
  3. 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)

  1. On the website's page, click “Files” and go into the public_html folder (or the subdomain's folder).
  2. If the .htaccess file 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.
  3. 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 RewriteCond line, every dot in the domain is written with a \ in front of it, as in the example.

  4. 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.com as 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, enter domeniul-tau.ro after https://, 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 www and a rule in .htaccess pointing to the version without www, 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 the http:// addresses in your content with https:// (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.
Support

Stuck? We'll do it together.

Tell us which step isn't working and, if you can, send a screenshot. We reply during business hours.

Phone and WhatsApp+40 775 396 021
HoursMonday–Friday, 9:00–18:00 Romanian time (EET/EEST)

Never send us your password on WhatsApp or by email. What information helps us solve it on the first try: how to ask for help.