Issue with Activating Automatic Platform Optimization (APO) on My WordPress Site

What is the name of the domain?

https://www.happypeoplemaker.com/

What is the issue you’re encountering

I am encountering an issue while trying to activate the Automatic Platform Optimization (APO) feature for my WordPress site, happypeoplemaker.com. Despite having subscribed to the APO add-on for $5 per month, I am unable to successfully activate it through the Cloudflare WordPress plugin.

Screenshot of the error

Dear Cloudflare Support,

I am reaching out regarding an issue I’m experiencing with activating the Automatic Platform Optimization (APO) for my WordPress site, happypeoplemaker.com. I have subscribed to this add-on at $5 per month, but I am unable to activate it correctly.

Here are the details of the issue:

  • Website: happypeoplemaker.com
  • Cloudflare Plan: Free plan with APO add-on
  • Cloudflare Plugin: Version 3.8.2 of the plugin installed on my WordPress site
  • Main Issue: When I attempt to activate APO or apply the recommended Cloudflare settings for WordPress via the “Apply Recommended Cloudflare Settings for WordPress” option, the process seems to get stuck, and the page loads indefinitely.

I have already tried the following solutions, but without success:

  • Deactivating WP Rocket: I deactivated the WP Rocket caching plugin to see if that would resolve the issue, but the APO activation still hangs.
  • Checking Cloudflare Settings: I double-checked my Cloudflare settings, but I am still unable to get APO working properly.

I would greatly appreciate your assistance in resolving this issue, as I am eager to utilize APO to improve my site’s performance.

Thank you in advance for your help.

Best regards

Something is still wrong with your server. A visit to the apex domain returns a redirect to www, but does include the necessary header:

> GET / HTTP/2
> Host: happypeoplemaker.com
> User-Agent: curl/8.7.1
> Accept: */*
> 
* Request completely sent off
< HTTP/2 301 
< date: Mon, 12 Aug 2024 16:53:17 GMT
< content-type: text/html; charset=UTF-8
< location: https://www.happypeoplemaker.com/
< cf-edge-cache: cache,platform=wordpress <~~~~~~~~~APO Header

A request to www does not have the header the plugin needs in order to activate:

> GET / HTTP/2
> Host: www.happypeoplemaker.com
> User-Agent: curl/8.7.1
> Accept: */*
> 
* Request completely sent off
< HTTP/2 200 
< date: Mon, 12 Aug 2024 16:52:52 GMT
< content-type: text/html; charset=UTF-8
< vary: Accept-Encoding
< last-modified: Mon, 12 Aug 2024 15:18:39 GMT
< cache-control: max-age=0
< expires: Mon, 12 Aug 2024 16:52:51 GMT
< age: 0
< x-cache: MISS <~~~~~~~~~~~~Your server cache
< cf-cache-status: DYNAMIC

And it still looks like you have some sort of caching system at your end that’s most likely preventing the header from coming through. Please turn that caching system off and try again.

Thank you for your prompt response and for the detailed information regarding the issue with the cf-edge-cache header.

I appreciate your guidance, and I have taken note of the potential conflict with the caching systems on my server.

I have contacted Bunny.net’s support team to request that they disable any integrated caching mechanisms on their end.

Once I have more information or if I require further assistance, I will reach out again. Thank you for your support.

Best regards

1 Like

Hey sdayman,

I am reaching out to you again regarding the ongoing issue with the cf-edge-cache response header missing on my website, happypeoplemaker.com. Despite numerous efforts to resolve the problem, the issue persists, and I would appreciate your assistance in troubleshooting further.

Summary of Actions Taken:

  1. Verification of HTTP Headers:
  • We used tools like curl and online services to verify HTTP headers. The cf-edge-cache header is present on some pages but not consistently, particularly after 301 Moved Permanently redirections.
  1. Modification of .htaccess File:
  • We added the following directive to the .htaccess file to ensure the cf-edge-cache header is set globally:
<IfModule mod_headers.c>
    Header set cf-edge-cache "cache,platform=wordpress"
</IfModule>
  • This change was made to force the inclusion of the header on all HTTP responses.
  1. Removal of HTTPS Forcing Lines in .htaccess:
  • We removed the lines that enforced HTTPS within the .htaccess file, as HTTPS redirection is managed by Cloudflare. This was done to avoid any potential conflicts.
  1. Analysis of 301 Moved Permanently Redirections:
  • We observed that requests to www.happypeoplemaker.com and happypeoplemaker.com are redirected to https://happypeoplemaker.com/ with a 301 Moved Permanently status.
  • The cf-edge-cache header is missing in the redirection response but appears in the final response after redirection.
  1. Review of Cloudflare Page Rules:
  • We ensured that the Page Rules in Cloudflare do not interfere with the cf-edge-cache header.
  1. Server Configuration Checks:
  • We confirmed that the server configuration (Apache/Nginx) does not block or alter the headers.
  • Server-side caching systems like Varnish and LSCache are either disabled or configured not to interfere.

Persistent Issue:

Despite these efforts, the error message indicating the absence of the cf-edge-cache header persists. This seems to occur mainly in relation to 301 redirections, even though the header appears on the final page after the redirection.

Request for Assistance:

I would like to understand why the cf-edge-cache header is sometimes missing and what steps can be taken to resolve this.

Thank you in advance for your support. Please let me know if you need any additional information from my end.

Best regards

Paulo

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.