The CW Corner – Avoiding and Resolving Let’s Encrypt Rate Limits

Recently, I encountered an issue while attempting to renew an SSL certificate for one of my domains, (let’s call it) testdomain.com, using Let’s Encrypt on a server running Virtualmin on Debian 12. The process was more complicated than I expected due to a small oversight that many others could easily make. This article details my experience, the errors I encountered due to Let’s Encrypt rate limits (which I didn’t know existed), and steps to avoid or resolve such issues.


The Problem: Let’s Encrypt Rate Limits for Failed Authorizations

A padlock that shows with an encrypted site using https in some browsers.

A padlock that shows with an encrypted site using https in some browsers.

Let’s Encrypt provides free SSL certificates for securing websites. However, it enforces rate limits to ensure fair usage and prevent abuse. While attempting to renew the SSL certificate for testdomain.com, I discovered that the DNS settings were not pointed to my server, causing repeated failed validation attempts. By the time I fixed the DNS settings, I had hit Let’s Encrypt’s rate limit for failed authorizations.

This limit restricts requests for the same domain to 5 failed attempts per hour. Once you hit this limit, you must wait for the cooldown period to expire before trying again.


How the Error Appeared in Virtualmin

In the Virtualmin interface, I attempted to renew the certificate by navigating to:

  1. Virtualmin > Server Configuration > SSL Certificate
  2. Clicking on the Let’s Encrypt tab
  3. Ensuring the domain and subdomain (e.g., testdomain.com and www.testdomain.com) were selected
  4. Clicking the Request Certificate button

The renewal process failed with an error that Virtualmin reported as “an unknown issue.” Upon further investigation, I found the detailed error logs in the Let’s Encrypt log file located at:

/var/log/letsencrypt/letsencrypt.log

From the log, I saw this message:

urn:ietf:params:acme:error:rateLimited :: There were too many requests of a given type :: too many failed authorizations (5) for "testdomain.com" in the last 1h0m0s, retry after [time].

Understanding Let’s Encrypt Rate Limits

Let’s Encrypt enforces several types of rate limits. Here are the key ones:

  1. Failed Validation Limit:
    • 5 failed validations per domain per hour.
    • This applies to any validation failure, such as DNS misconfigurations or inaccessible .well-known/acme-challenge directories.
  2. Duplicate Certificate Limit:
    • 5 identical certificates per week.
    • If you request the same set of domains repeatedly, you’ll hit this limit.
  3. Certificates per Registered Domain:
    • 50 certificates per registered domain per week.
    • All subdomains count toward this limit.
  4. Account-Level Requests:
    • 50 certificates per account per week.

These limits are described in detail at Let’s Encrypt’s rate limit documentation.


Diagnosing the Problem

If you encounter a similar issue, here are the steps to diagnose and resolve it:

1. Check DNS Settings

  • Ensure the domain’s DNS A records correctly point to your server.
  • Use tools like dig or online DNS propagation checkers to verify.

2. Verify Webroot Accessibility

  • Let’s Encrypt uses the webroot method to validate domains by creating files in the .well-known/acme-challenge/ directory.
  • Ensure this directory is publicly accessible. You can test it by creating a file and accessing it in a browser:
    http://testdomain.com/.well-known/acme-challenge/test-file

3. Examine Let’s Encrypt Logs

  • Detailed logs are stored at:
    /var/log/letsencrypt/letsencrypt.log
  • Look for messages indicating a rate limit or validation failure.

4. Check Cooldown Period

  • If you’ve hit the rate limit, the log will indicate a Retry-After time in UTC. Convert it to your local timezone to determine when you can retry.

5. Dry Run Your Request

  • Before making a live request, use Certbot’s --dry-run option to test:
    certbot certonly --webroot -w /path/to/webroot -d testdomain.com -d www.testdomain.com --dry-run

Steps to Avoid Future Issues

1. Ensure DNS Settings Before Requesting Certificates

  • Double-check that DNS records point to the correct server and have propagated globally before initiating an SSL request.

2. Test Webroot Configuration

  • Verify that the .well-known/acme-challenge/ directory is accessible for all domains you’re requesting.

3. Use the Dry-Run Option

  • Always test with --dry-run before making a live request to avoid hitting limits.

4. Automate Renewals

  • Virtualmin and Certbot support automated renewals. Ensure the cron job is configured correctly and DNS remains stable.

5. Avoid Forcing Duplicate Requests

  • Options like --duplicate and --force-renewal can lead to unnecessary requests. Only use them when absolutely necessary.

Conclusion

Hitting Let’s Encrypt’s rate limits can be frustrating, but understanding the causes and solutions can save time and effort. By checking DNS settings, verifying webroot accessibility, and using dry runs, you can prevent failed authorizations and avoid cooldown periods.

If you’re using Virtualmin, remember to check the Let’s Encrypt logs for detailed error messages, and plan your certificate renewals carefully to stay within the rate limits. Hopefully, my experience with testdomain.com helps you navigate and prevent similar issues.

As always, proactive testing and attention to detail go a long way in maintaining a secure and smoothly running server.

FacebooktwitterredditpinterestlinkedinmailFacebooktwitterredditpinterestlinkedinmail

The CW Corner – Adding a SimplePractice Widget to a Divi Website

SimplePractice: Incorporating its Widget into your WordPress Divi Website

This article is about adding the SimplePractice widget to your WordPress website that uses the Divi theme. I’ll explain what SimplePractice is and get into how to install its widget into your WordPress Divi website.

Simplifying Practice Management for Mental Health Professionals

LADAC session depiction with clientSimplePractice is a trusted all-in-one platform designed to make life easier for mental health professionals and other wellness practitioners. See https://SimplePractice.com for more details. It streamlines essential administrative tasks like scheduling, billing, documentation, and client communication, allowing practitioners to focus on what truly matters—their clients. With a user-friendly interface and powerful tools, it’s an ideal solution for solo practitioners and small group practices.

One of the standout features is its online scheduling tool, which lets clients book appointments through a secure, HIPAA-compliant client portal. This portal also allows clients to complete intake forms, sign documents, and even message their provider—all in one place. For therapists who offer virtual sessions, the telehealth integration enables seamless video appointments without the need for third-party apps.

SimplePractice also simplifies billing and insurance management. Providers can create invoices, process payments, and submit insurance claims directly through the system. Plus, its customizable progress notes and treatment plan templates make maintaining records both quick and efficient.

What makes SimplePractice shine is its simplicity. The platform is intuitive and easy to navigate, with minimal learning curves for both practitioners and their clients. The robust support team and extensive online resources ensure any questions are resolved quickly.

Whether it’s automating reminders, securely managing client data, or customizing a practice’s workflow, SimplePractice makes running a private practice straightforward and stress-free. It’s the tool busy professionals rely on to save time, stay organized, and provide exceptional care.

The SimplePractice appointment request widget can be incorporated into a development domain for your client’s pending Divi site and ultimately in the live site. Here’s how you can achieve this:


Step 1: Review the Widget Code

Once you have the widget code from the client, you need to verify its structure. Typically, it includes a <script> tag provided by SimplePractice. For example:

<div id="spwidget-container"></div>
<script src="https://widget.simplepractice.com/js/embed.js" data-sp-client-id="your-client-id"></script>

The data-sp-client-id is unique to your client’s SimplePractice account, so ensure that value matches.


Step 2: Add the Widget Code to the Divi Site

In Divi, you can embed custom code into the site using the Code Module or Theme Builder:

  1. Using the Divi Code Module:
    • Open the page or section where you want to display the widget.
    • Add a Code Module within the desired row or column.
    • Paste the SimplePractice widget code into the module.
    • Save the changes and preview to ensure the widget appears as expected.
  2. Using Divi Theme Builder (if the widget should appear site-wide):
    • Navigate to Divi > Theme Builder in the WordPress dashboard.
    • Create or edit a custom header, footer, or body section.
    • Add a Code Module and paste the widget code.
    • Assign the template to the desired pages or the entire site.

Step 3: Customize the Widget (Optional)

The Customizing Your Widget section in the SimplePractice documentation explains how you can:

  • Change colors, fonts, and styles to match the Divi site’s design.
  • Customize settings by modifying the <script> code parameters.

If your client’s code already includes customization, verify if it aligns with the new site’s look. For further adjustments, update the styles within the widget script.


Step 4: Use the Development Domain

SimplePractice widgets do not rely on a specific domain to function, as long as the data-sp-client-id is correct. You can install and test the widget on the development domain without any issues. Once the site goes live on the actual domain, the widget should still work without changes.

However, after the site goes live, it’s good practice to:

  • Confirm the widget works properly on the live domain.
  • Recheck any customized URLs or redirects tied to the widget to ensure they match the live setup.

Step 5: Test the Integration

  1. Navigate to the development site.
  2. Test the widget to ensure it displays and works correctly (e.g., appointment requests can be submitted).
  3. Check for any conflicts with other scripts or plugins on the Divi site.
FacebooktwitterredditpinterestlinkedinmailFacebooktwitterredditpinterestlinkedinmail

The CW Corner – Resolving Default Page Mismatches on a Hosted Website

Resolving Default Page Mismatches

Nightly Backup ServerWe had a website transferred to us for hosting by a client who did not know about resolving default page mismatches. This occurs, for example, the a page not found error happens when a site visitor is clicking on your navigation trying to get back to the home page. When hosting a website, ensuring that the correct default page is served when visitors navigate to the root domain (e.g., exampledomain.com) is critical. A mismatch between menu navigation items and the actual default page can confuse visitors and lead to a poor user experience. Below, I’ve outlined several methods to address such issues. Each method depends on the tools and access available on your hosting environment.


1. Redirect Default Page Using a New default.htm File

The simplest solution is to create a default.htm file that redirects visitors to the correct index.html file.

Steps:
  1. Create a new file named default.htm in the root directory of the website.
  2. Add the following HTML code to the file:
    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta http-equiv="refresh" content="0;url=index.html">
        <title>Redirecting...</title>
    </head>
    <body>
        <p>If you are not redirected, <a href="index.html">click here</a>.</p>
    </body>
    </html>
  3. Save and upload the file to the server.

When visitors access exampledomain.com/default.htm, they will be automatically redirected to index.html.


2. Set Default Pages in Virtualmin

If your hosting server uses Virtualmin, you can configure the default pages it prioritizes when serving the site.

Steps:
  1. Log in to Virtualmin.
  2. Navigate to the specific domain by selecting it from the dropdown.
  3. Go to Server Configuration > Website Options.
  4. Locate the option for “Default index file names” or similar.
  5. Add default.htm to the list if it is not already present. For example:
    index.html index.htm default.htm
  6. Save the changes and reload the website.

With this configuration, default.htm will be recognized as a valid default page alongside index.html.


3. Use an .htaccess File

You can also use an .htaccess file to specify which files should be served as default pages.

Steps:
  1. Access the root directory of the website via FTP or the file manager.
  2. Open or create a file named .htaccess.
  3. Add the following lines to the file:
    DirectoryIndex default.htm index.html index.htm
  4. Save the file and upload it to the server.

This tells the server to prioritize default.htm as the default page. If default.htm is not found, it will fall back to index.html or other specified files.


4. Update Navigation Links in the Website’s Code

If all navigation menu items point to default.htm, you can update the site’s HTML files to point to index.html instead.

Steps:
  1. Download the HTML files that contain navigation links.
  2. Search for default.htm in the code and replace it with index.html.
  3. Save and upload the updated files to the server.

This ensures that navigation links point to the correct file and prevents further confusion.


5. Configure the Web Server Directly

For advanced users with root access to the server, you can modify the web server’s configuration files to set the default page order.

Apache Servers:
  1. Edit the Apache configuration file (e.g., /etc/httpd/conf/httpd.conf or /etc/apache2/apache2.conf).
  2. Find the DirectoryIndex directive and modify it:
    DirectoryIndex default.htm index.html index.htm
  3. Save the file and restart Apache:
    systemctl restart apache2
Nginx Servers:
  1. Edit the server block configuration file (e.g., /etc/nginx/sites-available/exampledomain.com).
  2. Modify the index directive:
    index default.htm index.html index.htm;
  3. Save the file and restart Nginx:
    systemctl restart nginx

6. Combine Redirect and Navigation Fixes

For maximum compatibility and user experience, you can combine several methods. For example:

  • Use the .htaccess file or Virtualmin to prioritize default.htm.
  • Add a redirect in default.htm for edge cases.
  • Update all navigation links to index.html.

Final Thoughts on Resolving Default Page Mismatches

Choosing the right method depends on your hosting setup and access level. If you’re looking for a quick fix, creating a redirect in default.htm is the easiest option. For a more permanent and scalable solution, consider updating the server configuration or .htaccess file.

Always remember to test changes thoroughly to ensure they work as expected before making them live. This will prevent any disruptions for your website’s visitors.

And, finally, at CharlesWorks we take care of these types of issues for you.

FacebooktwitterredditpinterestlinkedinmailFacebooktwitterredditpinterestlinkedinmail

The CW Corner – Saving Money on Your Electric: PSNH/Eversource Electric Bill

Many costs for energy have risen in recent months. Here in the Northeast our electric bills just suffered a 110% hike. For the math challenged: that’s more than doubled!! The change was this:

  • OLD RATE pre 8/1/2022: 10.669¢ per kWh (kilo or thousand watt hours)
  • NEW RATE post 7/31/2022: 22.566¢ per kWh

I operate CharlesWorks from my home. So this applies to home services. We run many web servers and computers here so the electric rate increase resulted in an immense change. Saving money on electric is important to everyone.

Saving Money on Electric through Research

The biggest hassle I ran into was simply understanding my electric bill. The monthly electric bill has gotten quite complex. There are two basic parts to my electric bill:

  1. Supplier: This is the part of the electric bill that just increased from 10.669¢ to 22.566¢ per kWh. This is the part that we can shop around for better pricing on.
  2. Delivery: This is the part of the electric bill that will remain constant. This seems the most complicated because there are a number of components (8 on my bill) listed in this. The total on my bill for these delivery charges ended up at 12.21¢ per kWh. Whatever this total amount is on your bill should not change should you switch suppliers. So this cost should remain the same.

I did a lot of research on this. Hopefully this will save you the hassle of researching. Ultimately, I discovered that the process is, like many things we study, learn and practice, quite straightforward.

To switch my electric supplier there were a couple of prerequisites I needed assurance of:

  1. That my electric bill was actually going to go down. Sounds over-simplistic but I am cautious when it comes to ongoing expenses.
  2. That there were no cancellation fees should I change my mind if the power rate were to lower. I’ve not really seen that happen before – but just in case.

Moving to Direct Energy

Direct Energy logoI decided to switch to Direct Energy. After a lot of researching around and talking to several others, I found they were the best of all worlds:

  1. LOW RATE: Direct Energy offers the lowest kilowatt hour rate at 16.59¢ kWh which was the lowest I could find.
  2. NO CANCELLATION FEE: Direct Energy offers switching to a 36 month contract with no cancellation fee should I move away. Most other companies I researched imposed at least a $100 cancellation fee.
  3. REFERRAL FEE: Direct Energy offers a referral fee. If you refer someone else to them who signs up they will give you a $50 referral fee. You can’t go wrong there. Mine is http://www.directenergy.com/refer-a-friend/raf/D866981 and if you click on that you can get started saving like I did.
  4. $50 FOR SIGNUP: At the time of this article Direct Energy is offering a $50 Visa Prepaid Card for signing up using a friend’s referral – so you can get this by using my referral code.

Here is the information you will need to switch over to Direct Energy. You should have this info handy when you sign up. It is all on your current electric bill:

  1. ACCOUNT NUMBER: You’ll need your current electric or gas bill Account Number. On my bill it was listed on the upper left corner of the first page.
  2. CUSTOMER NAME KEY: You’ll need what is called the Customer name key. On my bill it is 4 letters located in the upper left corner of the second page of the electric bill.

So switching really was a no brainer in light of the worst PSNY/Eversource electric power rate increase I have ever seen.

Act Now

I can’t say how long this rate or particular deal will remain in effect. I can only encourage you to act now while the offer is happening.

Just CLICK HERE to take advantage of this offer while it lasts!

FacebooktwitterredditpinterestlinkedinmailFacebooktwitterredditpinterestlinkedinmail

The CW Corner – Best practices for mitigating website hacks

We at CharlesWorks are often asked by our web clients if their site is protected from malware and getting hacked. They also want to know if there site IS hacked, whether there be a charge to fix it.

The totally hack-proof website

The totally hack proof website has no access to it. So it’s not connected to the Internet. No one can view it. Such a website doesn’t sound like its of much use if no one can see it.

So, let’s agree that it is unrealistic to believe that a publicly accessible website can be totally hack-proof. Any website that is accessible via the public Internet is consistently subjected to attempts to break into it. Believe it or not, that’s the norm as opposed to the anomaly.

That being said, however, there ARE things you can do to mitigate website hacks. I have to stress the word mitigate here. Mitigation is defined as the action of reducing the severity, seriousness, or painfulness of something.

Site hacks are based on odds

My goal here is to simply remind you of what you most likely already know: that we can reduce the probability – the odds – of your site being hacked. We at CharlesWorks want that probability to be so low that it hopefully it doesn’t ever happen to you.

The major hacking causes

I have been operating CharlesWorks since 1998. In my experience, there appear to be two major reasons why sites get hacked:

    • The access credentials/passwords have been compromised.
    • The software that operates them wasn’t kept up to date.

Lets take a look at each of these below.

Compromised Access Credentials

Compromised passwords and bad actors gaining access to website login credentials is the major reason we see sites hacked. Think about this in terms of your car. You could have alarms on it. But if you make a copy of your car key and give it to someone, they can do whatever they like with the car. Whether its a drive along the beach or to rob a bank, your car is theirs to use with the key you gave them. Credentials – log in and passwords – work pretty much the same way.

CharlesWorks has many clients who want to be able to do things themselves. We are strong proponents of doing it yourself when it’s feasible and convenient. This is especially true for adding posts or page materials. It also makes sense when making other changes or modifications to your site. It is, after all, YOUR website.

However, many people fall prey to phishing schemes. Directly or indirectly, they usually end up tricked into giving out their website access credentials (as well as credentials to everything else they own). This is especially true if your email account is hacked and the hackers are able to access emails containing your website’s (and other) login credentials.

This problem is exacerbated if you have shared your website’s administrative or other access with others. Think of your emails containing various authorizations or login information as a potential weak link in a chain. If you have shared that information with others you have now created more weak links. This increases the odds of a potential compromise.

One of the best ways to mitigate these situations is to change your site’s access passwords so they are different than those possibly stored in your emails. And, to hope that anyone you may have shared your website access with has done the same.

Obviously, should site access be gained in such a manner, it would be your burden to have the site restored. I’ll expound upon this a little more at the end of this article.

Out of Date Security/Software Updates

Malware and virus protection on home computers operates a little differently than the same types of protection on servers. Website servers operate in the publicly accessible Internet. This results in many more entry points for potential issues. There are a number of very standard server protections available (which we utilize here at CharlesWorks).

After bad actors getting (or guessing) your passwords, the next major reason sites get hacked surrounds unapplied security updates and other software update issues. At CharlesWorks we mitigate such issues by running anti-malware software on our servers. Also, WordPress sites hosted on our servers are kept up to date automatically via automatic updating of the WordPress core as well as automatic updating of the the website’s plugins and themes.

There are literally thousands of individual pieces of software that must work in unison to operate most websites. These are developed by many more thousands of developers around the world. Unfortunately, no company can guarantee that a website will never get hacked. They can only mitigate security compromises and hope against the worst.

Restoring your Website

Regardless of which of the two situations above may have led to your website’s issues, your website will most likely need to be restored. That’s because after a bad actor or a hack back doors into the site will most likely have been installed for the bad actors to gain access again.

Many Internet companies claim to have automatic backups. In most of those, those backups are accessible to the user in their account. If the account is hacked, how safe do you suppose that is?

Some Internet companies delete and account upon a website being hacked. In those cases I have seen many left with no website or backup as a result.

What I believe is most important regarding this topic is the manner in which our WordPress sites are backed up every day for 30 days. Our backups are made to separate servers – external to those your the site operates on. For security reasons, the site administrators do not have access to these backups. So even with a site administrator’s compromised passwords there is no access to the backups. With these backups we can usually restore an average site in about 10-30 minutes if it needs restoring. And we can go back as far back as 30 days. We would only bill our web client for the 10-30 minutes (again – for an average website) which results in only a minor charge to restore it. Note that some websites are extremely large and require much more time to restore but these are very rare).

In my experience running CharlesWorks since 1998, we’ve built and handled more than 5,000 websites. At this point in time, I do not recall the last time a website we built and totally maintained was hacked (unfortunately I recall several instances of sites maintained by others that failed to ensure the site was updated and/or had their passwords compromised).

Sites getting hacked for out of date software happens far less frequently (if at all) when security updates are kept up to date and bad actors are kept out.

I hope this helps you understand a little more about this topic.

FacebooktwitterredditpinterestlinkedinmailFacebooktwitterredditpinterestlinkedinmail