Important:
Please make sure the 10Web Booster plugin is installed and activated, otherwise connected sites will not be able to use any of the Booster options.
Before you begin
Please make sure you are not using other speed booster plugins while using the 10Web Booster plugin as they may conflict with one another. If you are using other speed booster plugins, you will see this warning along with a list of the conflicting plugins:
These plugins may conflict with 10Web Booster and negatively affect the optimization. Deactivate them to avoid any conflicts.
Rest API is blocked
The 10Web Booster plugin uses Rest API to communicate and interact with the performance and Image Optimization services responsible for website optimization.
Here are the main reasons why your Rest API may be disabled:
- Security plugin/service
- IP blocked by hosting provider
- Plugins that disable Rest API
If you have enabled the 10Web Booster on your website and notice no changes are taking place when you switch modes or when you customize the optimization of your URLs, please check to see if your API is working.
To check if your API is disabled
- Enter your domain followed by the /?rest_route=/ ending in the browser, eg: yourdomain.com /?rest_route=/
If the return is a page with JSON, then your API is enabled. In the case that you are redirected to an error page, then your Rest API is disabled or not working.
To check if the 10Web Booster Rest routes for GET and POST are working, you can use this tool.
- To check the GET route, clear the box field and copy and paste the following URL where yourdomain.com is your domain name.
curl -L https://yourdomain.com?rest_route=/tenweb_so/v1/
- To check the POST route, clear the box field and copy and paste the following URL where yourdomain.com is your domain name.
curl -X POST -L https://yourdomain.com?rest_route=/tenweb_so/v1/check_domain
Important:
Please make sure to keep all command spacing in front of the URL, as is. If the status returned is 200, then the Rest API is working. If you see a 404, then the Rest API is disabled or not working.
Troubleshooting disabled API
After having determined that your Rest API has been disabled, the next step will be trying to determine which plugin has disabled the Rest API. For this there is only one way:
- Log in to your WordPress admin
- Go to Plugins
- Deactivate your security plugins one at a time.
Make sure to check with the above URLs if the Rest API has been enabled after the plugin deactivation.
If you find that a plugin was causing the deactivation of the 10Web Booster Rest route, to continue using the 10Web Booster, you should deactivate that plugin.
If none of the plugins have affected the Rest API, contact your hosting support as it may have been disabled by your hosting provider and ask them to whitelist the IP addresses for 10Web services.
- 40.114.115.187
- 13.66.227.49
- 13.92.59.87
- 52.151.28.87
- 40.117.75.176
- 13.90.229.95
- 52.191.187.114
Important:
If you are using Cloudflare and have the Bot Fight Mode option enabled, in your Cloudflare dashboard, navigate to Security > WAF(Web Application Firewall). Click on the Tools tab and enter a 10Web IP address from the above list in the IP, IP range, Country name, or ASN field. Set the Action to Allow and click Add. Repeat this for each IP address.
After whitelisting, check with the above URLs again to make sure the Rest API is working.
Important:
To view results that are true, please make sure that you are viewing URLs in Incognito mode.
cPanel
Depending on the number of requests sent and the type of firewall, sometimes cPanel may block the IP address to protect your site. If you have access to cPanel you can whitelist the 10Web performance service IP addresses:
- 40.114.115.187
- 13.66.227.49
- 13.92.59.87
- 52.151.28.87
- 40.117.75.176
- 13.90.229.95
- 52.191.187.114
If you don’t have access, ask your hosting provider to whitelist them for you.
WebP not activating automatically
The 10Web Booster automatically serves WebP images where possible. In some cases WebP will not activate automatically. Depending on your server, please follow the corresponding instructions to serve your images in WebP.
Apache
If you are using Apache software and 10Web doesn’t have access to it, we will not be able to automatically activate the serving of WebP images. In order to serve your images with WebP, you will need to manually configure it for server side serving.
- Copy the following code into your .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
# Does browser explicitly support webp?
RewriteCond %{HTTP_USER_AGENT} Chrome [OR]
# OR Is request from Page Speed
RewriteCond %{HTTP_USER_AGENT} "Google Page Speed Insights" [OR]
# OR does this browser explicitly support webp
RewriteCond %{HTTP_ACCEPT} image/webp
# AND NOT MS EDGE 42/17 - doesnt work.
RewriteCond %{HTTP_USER_AGENT} !Edge/17
# AND is the request a jpg, png or gif?
RewriteCond %{REQUEST_URI} ^(.+)\.(?:jpe?g|png|gif)$
# AND does a .ext.webp image exist?
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI}.webp -f
# THEN send the webp image and set the env var webp
RewriteRule ^(.+)$ $1.webp [NC,T=image/webp,E=webp,L]
</IfModule>
<IfModule mod_headers.c>
# If REDIRECT_webp env var exists, append Accept to the Vary header
Header append Vary Accept env=REDIRECT_webp
</IfModule>
<IfModule mod_mime.c>
AddType image/webp .webp
</IfModule> - Reload Apache2
- Click on the inactive reload button, if it becomes active then the configuration was successful.
Nginx
If you are using Nginx servers, you will need to manually add the code into nginx.conf in order to have server side serving of WebP images.
Note:
If you don’t have access to the nginx.conf file, ask your hosting provider.
- Add the following code into the nginx.conf before the server directive
map $http_accept $webp_suffix {
default "";
"~*webp" ".webp";
} - Add the following into the nginx.conf inside the server directive
location ~* ^.+\.(png|jpe?g)$ {
add_header Vary Accept;
try_files $uri$webp_suffix $uri =404;
} - Reload Nginx
- Click on the inactive reload button, if it becomes active then the configuration was successful.
Picture tag
There may be some cases where serving WebP images will not be possible. For these cases, you may enable the <picture> tags by clicking on the toggle.
Cache could not be cleared
If you have other cache plugins installed on your website, we may not be able to clear your website cache. Please clear the cache of your website manually then reanalyze the score.
Check if 10Web Cache is hit
Headers are added to HTTPS requests. One way to check if your website has been optimized, if cache is working on that page, when the last optimization of the page was, and more, is to look at the headers.
These are the response headers added by 10Web to a page:
- x-two-page-cached - If a page is cached you will see a 1
- x-two-cache-date - The date it was last cached
- x-two-critical - If critical CSS has generated you will see the word success
- x-two-optimize - If the page was optimized, you will see a 1
- x-two-version - Displays the version of the 10Web Booster
- x-two-webp - If webP is successfully enabled, you will see a 1
To check if 10Web Cache is enabled and hit, you can use the Google Dev tools by:
- Left click on the page and click on Inspect
- At the top menu bar, click on Network
- Click the Doc filter
- Click refresh
- In the Headers tab, navigate to Response Headers
If the response header x-two-page-cached has a 1 in front of it, then 10Web cache is hit. If there is a 0, then something is not working properly and cache is not hit.
Check if critical CSS is generating
To check if the critical CSS of the page is generating, you will need to add
?two_critical_status&uid=insertanyvalue
to the end of your page URL then look at the Response Headers of your page using Google Dev tools.
If the Response Header for x-two-critical has a success in front of it, then critical CSS is generated.