How will self-hosted WordPress work with Google Page Speed Service?

Potential Issues

Google’s Page Speed service does not work with “naked domains”. That is, it will not work with just “example.com”. The domain name must have a subdomain in front of it, such as “www.example.com”.

This is due to a limitation on Google’s implementation of the Page Speed service, which requires you to set up a CNAME record in your DNS. This is not a generic limitation of the Page Speed system itself, and you can use the open-source mod_pagespeed to achieve the same ends, if you have that level of access to your webhost.

So if you do attempt to use the Page Speed service, migrate your entire site to a subdomain setup first. Note that this will affect subdomain installations of multisite setups.

Reference Domains

The reference domain is only used for DNS lookups.

For example, say I’m moving a site at example.com onto their service. The domain example.com lives on the IP address 1.2.3.4.

Now, Google Page Speed service needs to know where your actual site is. To do this, they want you to set up a reference domain at ref.example.com pointing to 1.2.3.4.

But, they’re only using this to get the IP address. When their system actually contacts your domain, it’s talking to 1.2.3.4 but setting the Host: header to example.com, not to ref.example.com.

So basically, WordPress sees no difference here. It will behave normally. It need know zero about the reference domain.

MultiSite Considerations

Multisite will work fine with Google’s Page Speed service, however only on a subdirectory setup. Subdomain-based setups will not work at all.

Google’s Page speed service provides proxy services for one domain/site only. However, a multisite in subdirectory configuration essentially is one domain/site as far as Google cares.

If you’re using multisite with different subdomain names, Google Page Speed service will not work due to their methodology. The requirement for a CNAME record in the DNS eliminates this. You can, however, use the open-source mod_pagespeed instead, which does the same thing but on your own servers instead of through Google’s proxy.

If you’re using multiple domain names with domain mapping, Google is going to consider that to be completely separate sites and will charge or require setup for them accordingly.

Static Caching

Static Caching plugins can be used with Google Page Speed service, as in this case Google is really acting as a proxy, not as a full caching service.

Google Page Speed service will cache several resources such as images, JavaScript and CSS files. However the actual HTML generated by your page will not be cached. Google will retrieve the normal page generated by your server and re-serve it to your users normally, after running it through their Page Speed tools.

The wp-admin and AJAX requests

If you do nothing special, the wp-admin section will be run through the Google Page Speed proxy too.

Since the normal mod_pagespeed seems to have no effect on the wp-admin code, it is unlikely that Google’s service will have any effect at all.

The same applies to all AJAX type behavior, mod_pagespeed has had no effect on these in tests.

Leave a Comment