How can I setup the custom domain

Here are the steps to set up a custom domain: 

1

Navigate to WordPress > Optimole > Settings

2

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

3

Go to https://dashboard.optimole.com/custom_domain and add the custom domain you will want to use instead of your_key.optimole.com (eg. cdn.example.com).

4

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.

5

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.

6

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:

https://support.cloudflare.com/hc/en-us/articles/115000310832-Certification-Authority-Authorization-CAA-FAQ

Just add the following authorities for your domain:
example.com. CAA 0 issue "amazon.com"
example.com. CAA 0 issue "amazontrust.com"
example.com. CAA 0 issue "awstrust.com"
example.com. CAA 0 issue "amazonaws.com"

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.