How can I setup the custom domain

Here are the steps to set up a custom domain: 


Navigate to WordPress > Optimole > Settings


Disable the image replacement until the process is finished. Make sure you save the changes.


Go to and add the custom domain you will want to use instead of (eg.


A certificate will be created for that domain; we will provide you with some DNS Records. You need to add inside your DNS for the domain you are trying to configure. This will validate the certificate.


After the certificate is validated, modify your wp-config.php so that you specify the usage of the new custom domain.

define( 'OPTML_CUSTOM_DOMAIN', '<user custom domain>' );

📝 Note: The <user custom domain>  has to be replaced with your custom domain, as you can see in the above screenshot, or you can directly copy the code snippet. This code is valid if you have only one custom domain. For multiple custom domains, these can be selected when connecting the plugin.


Reactivate the  image replacement from the WordPress plugin.

📝 Note: In the Images Domain (right panel), you can observe that the name has been modified to match the custom domain you established.

If you encounter any issues at any of the steps mentioned before, you can let us know, and we will help you resolve any issues.
Take note that a certificate must be validated within 72 hours from the time it was generated, or else it will expire.

AWS Authorization

The last step is that you will have to allow AWS to validate certificates for you as specified here:

Just add the following authorities for your domain: CAA 0 issue "" CAA 0 issue "" CAA 0 issue "" CAA 0 issue ""

This should allow AWS to emit an SSL certificate for you and validate it.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.