Help with this 404 error Missing .htaccess with correct rewrite rules

Greetings I am trying to install a free SSL certificate in my hosting

But I have a problem:

In the validation process I must open in the browser

/.well-known/acme-challenge/NAa5aNF_6MCtI77nn4oFwlzzprOSBqAgiFL71ECTTAI

And it does not open to me, it gives me the following error

  1. Missing .htaccess with correct rewrite rules

Aware that the file exists, I have option 2

Treasury tests rename the file:
NAa5aNF_6MCtI77nn4oFwlzzprOSBqAgiFL71ECTTAI by NAa5aNF_6MCtI77nn4oFwlzzprOSBqAgiFL71ECTTAI.txt

When I rename it with a .txt extension, I could open it if difficulty

What should I add to .htaccess to allow me to open files similar to the example without extensions, since it is vital in the validation process to obtain an SSL certificate?

Thank you very much for your help
Ivan

The answer depends on some other questions:

  1. What type of web hosting are you using?
  2. What is your domain name?

Usually, no changes are required to allow extensionless files under Apache. The issue is likely to be specific to either the web application you are using, or something about your hosting service. Please answer the above questions.

You can try this at the very top of your .htaccess file, but I can’t guarantee it will work:

RewriteEngine On
RewriteRule ^\.well-known - [L]
1 Like

Greetings friend, thanks for your attention
The hosting is Mochahost and I have the package
Business 3y (Linux) G28
And the domain that I am trying at the moment is casacolonia1736.com

I tried the suggestion you gave me, but it did not work
Thanks again
Ivan

Hi @ivansg

that domain isn't registered ( https://check-your-website.server-daten.de/?q=casacolonia1736.com ):

Host T IP-Address is auth. ∑ Queries ∑ Timeout
casacolonia1736.com Name Error yes 1 0
www.casacolonia1736.com Name Error yes 1 0

So you can't create a certificate with that domain name.

You need a worldwide unique and public visible / registered domain name. So Letsencrypt is able to check your domain via webserver or via dns.

Please read

More important: What client do you use?


Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. crt.sh | example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is:

I ran this command:

It produced this output:

My web server is (include version):

The operating system my web server runs on is (include version):

My hosting provider, if applicable, is:

I can login to a root shell on my machine (yes or no, or I don't know):

I'm using a control panel to manage my site (no, or provide the name and version of the control panel):

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot):

--

The error message sounds unspecific. So if this is a website like sslforfree etc., the error message may be wrong.

Greetings JuagerAuer, thank you very much for your assistance.
Let’s start from the beginning and try to answer your questions as best as possible so you can help me.

About a year ago I rented a MochaHost hosting which is in linus (I must see what version and distribution they use) this package allows me to have several domains.

I currently have casacolonia1736.com (under construction) and hostalfelicia.com (I had not mentioned this since I was experienced with the other. Once the same problem was solved here).

Well when I set up the hostalfelicia.com site from my Cpanel activate https and generate an SSL Certificate which was 1 Year long, although it apparently worked. He had a self-signed certificate and which in browsers always showed an alert.

Now, next to expire these days. I saw the option
of a certificate https://sslforfree.com and I saw that I could obtain it and that the green lock would also be shown in the browser.

I proceeded to obtain the certificate and from there comes the error in the verification process I cannot do the verification it gives me 404 error.

Currently I reassembled the self-signed certificate I did it through my Cpanel. But as you can see and follow in the same

The website
hostalfelicia.com belongs to my mother and the casacolonial1736.com belongs to me.

Business hosting package
Server name mocha3023
cPanel Version 78.0 (build 27)
Apache Version 2.4.39
PHP version 5.6.40
MySQL Version 5.6.43
X86_64 Architecture
Linux operating system
Shared IP Address 50.31.138.24
Perl version 5.16.3
Kernel version 3.10.0-714.10.2.lve1.5.12.el7.x86_64
Cpanel 78.0.27

I can login to a root shell on my machine: I don’t know

I’m using a control panel to manage my site: yes, Cpanel 78.0.27

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you’re using Certbot): I don’t know

I have tried to answer your questions best, if you need to know anything else.
Thank you in advance for your interest in helping me.

attentively
Ivan.

So the error message comes from sslforfree, not from a local Letsencrypt client. Sslforfree knows nothing about your configuration.

If you use cPanel: Isn't there an integrated solution?

That's always the best version.

Maybe cPanel blocks /.well-known/acme-challenge/random-filename.

If the error is given by sslforfree.com they give me two files which I upload these folder /.well-known/acme-challenge but when I try to validate it gives the error 404

I have a FreeSSL Certificates icon in the Cpanel (Let’s Encrypt) but when I click it, it downloads a file with the name index.live.pl (I do not know what this is for)

If somehow I think that this blocked /.well-known/acme-challenge/random-filename.
Since if that same random file if I put the extension .txt shows me without problems in the browser

What recommendation would you give me to solve this problem?
What would be the best solution for the Cpanel a FreeSSL Certificates icon (Let’s Encrypt)?

Waiting for your help
attentively
Ivan

That's not meant to happen - sounds like they are using this plugin but have messed up the installation. Your web host needs to fix it, talk to them.

1 Like

Thank you for your comment.

I would really like to uninstall this certificate since I used it for 1 year and always in the browser it was seen as an unsafe site.

And I would like to install the certificate of https://www.sslforfree.com/
Well I will contact the hosting service I hope they can help me solve the problem.

Thanks again
Any suggestion is welcome
attentively
Ivan

If you have a corrupted cPanel installation, your hoster should fix it.

And if your cPanel works, there is no need to use sslforfree.

Letsencrypt certificates are only 90 days valid.

So you have to use sslforfree every 60 - 85 day. That’s not that what you want.

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