**Problem**
Using .htaccess to force HTTPs on my Wordpress site does not work

**Tried solution**
On my Wordpress site I have the following .htaccess code

```
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

```

But to force using HTTPs I'am trying to replace it with this code:

```

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} mydomain\.dk [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.mydomain.dk/$1 [R,L]
</IfModule>

```

**Result**
The website is no longer working (here is the website response):

```
This page isn’t working
www.mydomain.dk redirected you too many times.

Try clearing your cookies.
ERR_TOO_MANY_REDIRECTS

```

**Questions**

1. Why can't I force using HTTPs on my Wordpress website?
2. What can I do to make it work?

Best regards, Henning