Assets Pull: Domain Check Errors
The assets pull addon lets you test your chosen domain so you can find out about potential problems before enabling URL rewriting.
The domain check uses the WordPress REST API to be able to make assertions about the configuration of the pull domain that we would otherwise not be able to if we were simply testing a static file.
The following is a list of possible errors that you may encounter when checking the configuration of your domain.
Hostname [example.com] could not be resolved to an IP address
This means your server cannot resolve example.com
to an IP address. This could be due to a typo in the domain name or if it is a new domain (or subdomain) you may need to wait a few minutes for DNS changes to propagate. When creating a new distribution with CloudFront, the dXXXXXXXXXXX.cloudfront.net
domain for your distribution will be unresolvable for a few minutes after creating it. You can use the Check again
link to try again every few minutes until you see this error go away. CloudFront domain names for a new distribution usually propagate within 3-5 minutes from creation.
S3 bucket set as CDN origin.
The CDN has been configured to pull from an S3 bucket instead of the site. The Assets Pull addon requires a different type of CloudFront distribution than used by the core WP Offload Media plugin to offload the Media Library. You must create a new CloudFront distribution for use with the Assets Pull addon.
Please re-run the set up wizard (there is a “Launch CloudFront Set Up Guide” link in the Assets tab once the settings have been saved) and follow its steps to properly configure a new CloudFront (or other CDN) distribution that pulls from the site, not an S3 bucket.
Invalid response code. Received [xxx] from test endpoint.
The cause varies based on the status code returned (xxx
).
404
– This means that the requested resource could not be found.
This could happen for a number of reasons:
- The configured pull domain is incorrect
- The configured origin on CloudFront (or your CDN) is not configured correctly
500
– This is potentially due to an internal server error. Check your PHP error log.
Invalid response type. Received [xxxxxxxxxxx].
This will happen for any request that does not return JSON as expected by the test endpoint, which is likely caused by a misconfigured domain or origin.
Query string missing "ver" parameter. Check your configuration.
This means that your CDN is most likely stripping the query string from the URL (everything including and after the ?
) to improve caching. It is important that your CDN is not configured to remove the query string to ensure that the proper version of your assets is served. At a minimum, it needs to be configured to allow the ver
parameter, but we recommend allowing all.
For CloudFront Users
- Navigate to your CloudFront Distributions in the AWS console
- Select your distribution in the list and click Distribution Settings
- Select the Behaviors tab
- Select your origin from the list and click Edit
- Scroll down to the settings for “Cache key and origin requests”
- Select “Legacy cache settings”
- Ensure it is set to Headers: None, Query string: All, Cookies: None
- Scroll to the bottom and click Save changes
If you made a change, you will see the distribution will show a status of In Progress in your list of distributions. It may take 15 minutes or more for the changes to finish deploying to all CloudFront edge servers before you see it take effect.
Malformed response from test endpoint.
This means that the response returned a proper code and type, but the body of the response could not be read. This could happen if extra output was included with the response such as PHP errors or notices for example. Check your PHP error log, make sure WP_DEBUG_DISPLAY
is set to false
and try again.
cURL error 60: SSL certificate problem: unable to get local issuer certificate
This error means your pull domain is using a self-signed certificate and it cannot verify its authenticity.
To bypass verification of SSL certificates (only for our domain check requests) you can add this filter:
add_filter( 'as3cf_assets_pull_test_endpoint_sslverify', '__return_false' );
Note: Do not add this filter on your production site as you want to make sure that your SSL is configured properly and using a valid certificate.
Invalid request signature.
The request signature checks that the response from the CDN came from the correct origin. This error would most likely happen if you were to test the domain from a staging environment using a domain configured to pull from your production site.
Other Errors
If you don’t see your error in this list, please open a support request with us through the Support tab of the WP Offload Media settings screen and be sure to include the message you’re getting.