SSL let's encrypt install

letsencrypt

#1

Looking to install a let’s encrypt certificate, Dreamhost mentions here https://help.dreamhost.com/hc/en-us/articles/216539548-How-do-I-add-a-free-Let-s-Encrypt-certificate-, to add code “RewriteRule ^.well-known/(.*)$ - [L]” is that to the htaccess file? and if so where in that file should it go?


#2

you would add that to an .htaccess file yes.

You normally shouldn’t need to however, only for the conditions mentioned in the same article, such as your existing .htaccess interferes.


#3

does it matter where in the htaccess file I put it? I know I might not need to but don’t want anything screwing my website up and not being a coder, if something DID go wrong, wouldn’t know how to fix. Better safe than sorry


#4

In a sense, it does matter where you put the rewrite rule. It should go inside the mod_rewrite configuration

<IfModule mod_rewrite.c>
  RewriteEngine on
  RewriteRule ^.well-known/(.*)$ - [L]
  [... other rules?] 
</IfModule>

But before you do that… are you sure you need to do that? The article you linked says:

To play it safe, rename your .htaccess file (to something like .htaccess_OFF) in order to turn it off temporarily. Then, install the certificate. Once installed, you can rename the file back to .htaccess.

Do you know for sure that disabling .htaccess breaks your site? In any case, make a copy of your .htaccess before editing it so you can quickly revert back any change in case your site stops responding properly.


#5

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.