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.
First, I see you request a new cert for webemitra.com nearly every day. Please stop doing that. You should only renew your cert periodically. The recommendation is to renew with just 30 days remaining before expiration which is every 60 days.
Your recent cert history. Your cert requests started every day starting on May3. Before that you only requested them periodically.
The "404" is an HTTP Not Found error. That usually means the documentRoot value you placed the challenge token in does not match your IIS server's document root.
Is this different for your www subdomain than it is for your root name?
And, what ACME Client are you using? And what version of it are you using?
If you developed it yourself please say so. Thanks.
Serving ACME challenges via IIS can be difficult because by default it doesn't serve extensionless text files and there can be things like authentication and content management system handlers in the way. If serving via IIS the basic test is to create a text file with no .txt extension at /well-known/acme-challenge/ then try to request that over http - if you get that working then real challenges will generally work as well.
As you are using Posh-ACME you should refer to their documentation but I would suggest that the self-host plugin would be most useful so that you can skip the challenge response via IIS, assuming it tolerates IIS running as well:
For other popular clients that work with IIS, there is also https://certifytheweb.com (a GUI + service, which I develop) and win-acme (command line).
Just curious @webprofusion how did you know it was Posh-ACME? I looked up its doc'd functions but did not see Get-ACMEChallenge so thought it was something else
Root name and subdomain both are same name.
Root Name - webemitra.com webemitra.com working fine and certificate generated for the same www.webemitra.com not working and unable to generate certificate
I'm using ACME-PS with v2 version. Thanks.
Run your script up and including Set-Content -Path $chFilename -Value $challenge.Data.Content -NoNewline; then check the /.well-known/acme-challenge path of your site and see if the expected file has been created and accessible via public http (not just from your local network).