PageSpeed Service

Frequently Asked Questions

Understanding and Evaluating the Service

Enabling the Service

Limitations of PageSpeed Service

Operating your Site with PageSpeed Service

Understanding and Evaluating the Service


What is PageSpeed Service?
PageSpeed Service is an online service to automatically speed up loading of your web pages. PageSpeed Service fetches content from your servers, rewrites your pages by applying web performance best practices and serves them to end users via Google's servers across the globe.
How does PageSpeed Service work?
As a webmaster:
  1. You sign up and provide us with your serving and origin servers.
  2. You send traffic to PageSpeed Service by pointing your DNS CNAME entry to pagespeed.googlehosted.com.
Google serves requests received for your serving domain by fetching content from your origin server and rewriting it.
My site has a really high score on PageSpeed Insights. Do I still need to use PageSpeed Service?
Sites with a high score on PageSpeed Insights (PSI) can still benefit from PageSpeed Service. PSI uses a point-based system that scores a page based on how well it adheres to a set of web performance best practices. Points are assigned based on an estimate of the impact of a given practice on page load time. PSI does not measure the actual time it takes for a page to load, therefore it does not capture real-world effects such as the benefits of using Google's global infrastructure to serve your site's content.
For a better estimate of the benefits your site can expect using PageSpeed Service, we would recommend using WebPageTest (WPT) to perform a comparison test. WPT does real page load time measurements to compare the performance of your site before and after optimization by PageSpeed Service, under different user conditions of geographic region, browser and network bandwidth.
What are serving domain and origin server?
Serving domain refers to the the domain that end users access, such as www.example.com. This is the domain that you want to speed up. Origin server refers to the location from which PageSpeed Service can fetch content from your servers, such as origin.example.com. Please ensure that your reference domain is setup correctly.
How can I determine if my web site is eligible?
If the limitations of PageSpeed Service do not affect your website, your site is eligible to use PageSpeed Service.
How much speedup can I expect after switching to PageSpeed Service?
In our testing, we have seen speed improvements of 25% to 60% on several sites. But we know you care most about the numbers for your site, so check out how much PageSpeed Service can speed up your site.
How should I measure the speedup when using PageSpeed Service?
You can use Google Analytics' Site Speed report to track the speed of your site before and after using PageSpeed Service.
Note: You should not be using the crawl fetch time reported by Google Webmaster tools to determine if PageSpeed Service is speeding up your website. The HTML fetch time reported by Google Webmaster tools is not the same as page load time. Loading a page involves several factors such as fetch time for resources, rendering by the browser, executing JS and so on. PageSpeed Service optimizes the entire page load and not just the HTML fetch time. Hence there may not be a reduction in Google crawler fetch time in your Google Webmaster tools crawl stats. It is also worth noting that crawler fetch times are NOT used directly in search ranking.
How does my SEO ranking get affected by PageSpeed Service?
Please refer to the information on measuing speedup and the impact of crawler fetch times on search ranking.
Why does my site not get a perfect 100 PageSpeed score, even when using PageSpeed Service?
PageSpeed Service will not rewrite and proxy resources, such as images, JavaScript and CSS, that are marked as not cacheable (for example they have the Cache-Control http header set to no-cache or private). Typically, resources used for serving Ads, Analytics and Social widgets on your webpage are not cacheable. There may also be resources hosted on your site which are marked as not cacheable. All such resources will not be optimized for performance. Additionally, dynamically requested resources, such as those generated from AJAX calls will also not be optimized unless they are CNAME'd to Google.
How can I evaluate the quality of rewritten pages served by PageSpeed Service?
Please complete the initial setup to use PageSpeed Service. During the setup, you will have the opportunity to preview your site just as it would appear to end users.
How much does the service cost?
At this time, the service is being offered to a limited set of webmasters free of charge. Pricing will be competitive and details will be made available later. You will then have at least 30 days to decide if you want to continue using the service.
What content gets cached by PageSpeed Service? If my site changes often, will stale HTML be served to my users?

PageSpeed Service speeds up loading of your page by caching the cacheable parts of your page (amongst other techniques). This includes resources such as images, JavaScript and CSS.

On the other hand, Pagespeed Service respects the cache control headers for all resources and HTML that your site serves. So, if your site’s homepage has cache control headers of cache-control:max-age=3600, PSS will cache your homepage’s HTML for 1 hour (60mins * 60 seconds/minute = 3600) before fetching the latest content from your origin servers. Meanwhile, if your cache control headers are “cache-control: no-cache, private”, then PageSpeed Service will never cache your HTML or resources, even if they rarely change. Instead, PSS will always fetch content from your origin server.

Please note that PSS will only fetch new content from your origin server when the cache control headers expire or when you manually flush the cache via the Flush Clache UI.

Ultimately, how you set your cache control headers is up to you because you know your site the best. If you would like the benefit of PageSpeed Service’s caching but also regularly update your site’s content, you can make a tradeoff between caching of content and freshness of content by changing the max-age value in your cache control headers. We recommend the following values:

  • For Javascript and CSS files - 1 hr cache-control:max-age=3600
  • For images (jpg, png, gifs) - 1 day cache-control:max-age=86400
  • For HTML - Not cacheable cache-control:no-cache,private
To learn more about updating these values via the Apache .htaccess file, please review these instructions.
I do not want to proxy my site's traffic through Google. How can I still use PageSpeed Service?
Unfortunately you cannot use PageSpeed Service unless your site's traffic is proxied through Google. However, Google offers other similar products that you can potentially use. mod_pagespeed can automatically rewrite your webpages in your servers, if you are using Apache. You can also implement the PageSpeed Browser Extension recomendations yourself by going through the list of recommendations for your site. Note that these options may need significantly more effort.
What is the difference between mod_pagespeed and PageSpeed Service? Do you recommend using both products?

Currently, using mod_pagespeed and PageSpeed Service at the same time does not provide any extra performance gains.

Apache mod_pagespeed is an open source Apache module that implements a number of the same rewriters that PageSpeed Service also implements. However, that is where most of the similarities end.

Meanwhile, PageSpeed Service offers a number of significant rewriters that mod_pagespeed does not have (though we expect this gap to close over time),in addition to a number of other benefits, such as:

  • Access to Google's global serving infrastructure
  • DDoS attack prevention
While mod_pagespeed does not have the above benefits, it offers the advantage of easier web development, since it optimizes resources directly on the filesystem. As a result, your assets update instantly, and you do not need to worry about prior cached content.
Does Google use PageSpeed Service to improve web search results or target advertisersing to users?
Google does not use the information collected from serving PageSpeed Service content towards improving search results or targeting advertising to end users. We may, however, use the information collected to improve the quality of PageSpeed Service itself, including making pages serve even faster. Please refer to the Terms of Service for complete details.
Does the Privacy Policy apply to users of my site?
The Google Privacy Policy and applicable Google Terms of Service do not apply to users of websites that utilize the PageSpeed Service. Users of websites utilizing PageSpeed Service should read those websites' own policies and terms for information on how their information will be used by those websites.
Is it ok to pass end-user data through URL parameters?
Privacy and security best practices on the web recommend that you do NOT include sensitive end-user data (such as credit card numbers, government id number, etc.) in URL parameters or in the clear. We recommend you use HTTPS to handle such sensitive information. You can find more information about enabling HTTPS traffic for your domain here.
Will PageSpeed Service optimize my site for mobile users?

All of PageSpeed Service’s optimizations are designed to improve your website’s performance across all types of browsing devices, including mobile, tablet, and desktop. Once you have chosen which rewriters to enable in the Configure Rewriters tab, you do not need to take any additional steps to optimize non-desktop devices. PageSpeed Service will handle the rest!

It is important to note that certain rewriters will be more effective for mobile and tablet devices than others. These rewriters include the Critical CSS rewriter, as well as the Defer Javascript rewriter. As with all rewriters, it is recommended that you verify the functionality of your site after enabling any new rewriters.

Does PageSpeed Service PSS optimize mobile apps?

PageSpeed Service primarily optimizes HTML web pages and HTTP traffic. Most mobile apps do not have any HTML web page components. As a result, mobile apps will only benefit from resources downloaded through PageSpeed Service's HTTP optimizations, such as resource minification, domain sharding, and resource caching.

Some rewriters, such as Cache and Prioritize Visible Content and Defer Javascript, are meant to optimize HTML pages. Therefore, mobile apps will see minimal benefit from these HTML targeted rewriters.

Enabling the Service


How do I start using PageSpeed Service?
Please complete the initial setup to use PageSpeed Service.
I got the activation link by email but I get a permission denied error when I try to sign into the console. How can I fix it?
The activation link sent out expires after 7 days. If you get the permission denied error after the link expires, please send an email to pss-support@google.com requesting a new activation link. If you are logged into multiple Google accounts in the same browser, please log out of all the accounts and sign in only into the account where you received the activation link.
Do I need to setup SSL support for my site with PageSpeed Service?
If your site needs to serve HTTPS pages on the same domain as the one you want to setup with PageSpeed Service (eg. https://www.example.com/checkout) then you need to setup SSL support for it with PageSpeed Service. If your SSL traffic is served via a different domain (eg. checkout.google.com) or a subdomain of your site that is not configured with PageSpeed Service (eg. https://secure.example.com), then you don't need to setup SSL support.
Note that it is not possible to simply exclude HTTPS pages from PageSpeed Service via a blacklist, and you will risk breaking pages on your site that require SSL support. Please see this FAQ for more information on the required separate setup process.
What is my origin server, and why do I need one? Where do I find my origin server? How do I specify my origin server?

Your origin server, also known as your original host server, is the domain name specified under “Hosted By You”, in the PageSpeed Service Console. It originally served your website’s content prior to using PageSpeed Service (PSS). Please note that PSS is a proxy and does not host your site’s content. Instead, PSS retrieves your site’s content from your origin server and then rewrites and delivers the content on your behalf. If you do not specify an origin server, PSS will not know where to retrieve your site’s content!

Your origin server is specified during the PSS setup process. If you would like to change your origin server, you can change it at the PSS Developer Console by clicking on the pencil icon under the “Hosted By You” section. Note, that if you are in the middle of setting up your domain, you must first complete the setup process before you can change your origin server.

For more information about how PSS works, we recommend watching this video.

Who is my DNS provider? Where do I log in to make my CNAME changes?
Follow these two easy steps to figure out who your DNS provider is and determine where you should log in to make your DNS changes.
  • Step 1 - Go to www.abongo.com and search for the bare domain of your site: e.g. example.com
  • Step 2 - Under the “Start of Authority (SOA) Record” section, look for the “Provider” field underneath “Name Server”.
In the example below, the DNS Provider is ICANN.
(Disclaimer: www.abongo.com is not associated with Google. Google does not endorse www.abongo.com and is not responsible for the accuracy or availability of that website or the content, products, or services on or available from it.)
How do I CNAME my domain to PageSpeed Service?
Please refer to the instructions to CNAME your site.
How do I know whether PageSpeed Service is enabled for my domain?
Please refer to the troubleshooting tips to find out if PageSpeed Service is enabled for your site.
How do I send a portion of my site's traffic to PageSpeed Service?
You can try PageSpeed Service by sending a percentage of your traffic to it, and slowly ramp it up as you feel comfortable. You can do this by setting up a mirror domain, say pss.example.com, and directing a percentage of your users to this mirror domain. Here is how you can setup this mirror domain to serve the same content being served from www.example.com:
  1. Setup a new DNS entry (A-record) for pss.example.com to point to the same server/IP address as www.example.com. Set the TTL for the A-record to 1/2 hour for quick reverts.
  2. If www.example.com is itself CNAME'd to xyz.example.com, then add a CNAME record for pss.example.com and point it to xyz.example.com instead of the A-record mentioned above.
  3. Ensure that the hosting servers serve the same content on pss.example.com as that being served on www.example.com.
  4. Verify that pss.example.com works correctly after the configurations. Push the domain live and watch it for some time to confirm that pages are being served correctly.
  5. A few things to watch out for:
    1. If the pages on the site require cookies, ensure that the cookies are being set correctly on the new domain. If cookies are being set on www.example.com rather than .example.com, the pages might break. Fix this by setting cookies on .example.com and handling it correctly on the server side.
    2. If the pages being served contain any absolute URL links that point to www.example.com, we suggest you change these to relative urls. Without this change, users will keep bouncing between www.example.com and pss.example.com and might see poor caching behavior.
    3. Be aware of SEO implications due to setting up of a new domain. It will take time for the links in the new domain to pick up in the ranking.
    4. If any banners/images contain the text www.example.com, change these to use pss.example.com.
Note: If you are sending a portion of your site's traffic to PageSpeed Service, you can skip the last step of the setup wizard (CNAME site), until you are ready to migrate the entire site's traffic.
What do I need to do once I start sending traffic to PageSpeed Service?
Familiarize yourself with what to expect next.
I see the error "Cannot enable the service for this domain..." during the verification step of the setup. How do I fix this?
If your website is hosted on Google App Engine, please use its Administration Console to enable PageSpeed Service by following these instructions.
Websites or domains hosted on Blogger or Google Sites are currently not supported by PageSpeed Service. Neither the serving domain, nor the origin server can be hosted on one of these products. Such sites will already be CNAME'd to ghs.googlehosted.com or ghs.google.com.
If your site is not already CNAME'd to one of these two domains but you still get this error, it is quite likely that you have a dangling entry associated with one of these products. Please follow these instructions to delete the entry and then try again.
I don't host my domain using App Engine or Google Sites, but when I tried to enable PageSpeed Service, I get the error "Cannot enable the service for this domain..." How do I fix this?
If your site is not currently CNAME'd to ghs.google.com, the association of your domain with these Google products is probably a dangling entry. You can delete it using the following steps:
  1. Log into Google Apps with your domain name and the section as Domain Management.
  2. Once you login, navigate to the Dashboard tab.
  3. If your site is associated with Google Sites, click on the Sites service. This should take you to the Sites settings page. In the Web Address Mapping tab, your domain, say www.example.com, should be listed as a mapping. Find this mapping and delete it.
  4. If your site is associated with Google App Engine, click on the associated App Engine service under the Google App Engine section. This should take you to the application's settings page. In the Web Address section, your domain, say www.example.com, should be listed as a mapping. Find this mapping and delete it.
  5. Wait for at least half an hour and then press Continue on the Console to proceed to the next step.
PageSpeed Service is showing me a message asking me to delete a stale database entry. Why is it asking me this?!
You are seeing this message because it appears that the site you are trying to enable with PSS has previously taken advantage of another Google integration (Google Pages, Google Sites, etc). This previous integration has created a database entry that is now causing a conflict with your PageSpeed Service setup. In order to proceed with setting up PageSpeed Service, you will need to remove this stale entry. If you are no longer using the previous integration, or are unaware of any previous integration, we recommend deleting the stale database entry so that you can proceed with your PageSpeed Service setup. However, if your website requires the other Google service to function, you should not delete this database entry. As a result, you will NOT be able to use PageSpeed Service.
How can I allow a teammate to also administer my site on PageSpeed Service?
  1. Log into the Google APIs console.
  2. Go to the Team pane by clicking on the Team link on the left.
  3. In the text box Add a teammate, enter the GMail Id of the person you wish to add as teammate.
  4. Select the desired level of permission from the drop down box next to the text box.
  5. Click on the Add button.
When the teammate logs into the Google API console with his/her GMail Id, he/she should see the same project in the list of available projects.
I'd like to setup more sites with PageSpeed Service. Do I need to signup to get a new activation link for each one?
You can add upto 50 domains to your existing project on PageSpeed Service from the API console. Click on the Add New Domain link to get started. There is no need to signup for a new activation link or wait from approval from the PageSpeed Service team.
How do I transfer ownership of my site to another account of mine?
If you set up your site with PageSpeed Service with one GMail account but want to transfer ownership to another GMail account, follow the steps below.
  1. Log into the Google APIs console with your old GMail Id.
  2. Go to the Team pane by clicking on the Team link on the left.
  3. In the text box Add a teammate, enter your new GMail Id. Select Is owner from the drop down box next to the text box.
  4. Click on the Add button.
  5. Log out of the Google APIs console.
  6. Log into the Google APIs console with your new GMail Id and go to the Team pane.
  7. Click on the X symbol next to the old GMail Id. Confirm the removal.
The new GMail Id now has ownership of your site in PageSpeed Service. You may need to re-verify the domain under the new GMail Id if you want to edit the origin server.
How do I disable PageSpeed Service?
To disable PageSpeed Service, revert the CNAME for your serving domain to point to the origin server. Do NOT disable your project in the console until this is done. Doing so may put your site in an inconsistent state for your end users. It is recommended not to make any changes in the Google APIs console, in case you want to try PageSpeed Service at a later time. If you still want to delete your project from the console, follow the steps below:
  1. Log into the console.
  2. At the top left corner, you should find the list of your projects in a drop down box. Select the project you want to delete.
  3. Then click the same drop down box again. You will see a menu item called "Delete". Select it and follow the instructions.

Limitations of PageSpeed Service


Does PageSpeed Service support bare domains?
PageSpeed Service currently does not support serving pages from bare domains. You will need to migrate your site to serve content from the full domain instead. See the how-to videos below for more information and consult the steps that follow:
  1. Follow the instructions in the setup guide so PageSpeed Service can correctly serve your full domain, say www.example.com.
  2. Configure your server to perform a server-side redirect (termed a "301 redirect") from your bare domain to your full domain. This means that when a user enters the bare domain for your site http://example.com in their browser, your server will redirect the browser to fetch content from the full domain http://www.example.com. This support page has more information on how to setup a 301 redirect.
  3. Set your full domain http://www.example.com as the preferred domain for Google to use. This will allow Google to index as well as send user search traffic directly to the faster pages served by PageSpeed Service. To specify the preferred domain:
    1. Login to the Webmaster Tools home page and click on your site.
    2. Under 'Site Configuration', click 'Settings'.
    3. In the 'Preferred Domain' section, select the full domain option.
With these changes, requests to both http://example.com and http://www.example.com will be served the same content using PageSpeed Service.
My domain currently redirects users from the full domain, www.example.com, to the bare domain, example.com. Why should I remove this redirect? How do I remove it?
When your full domain, www.example.com, has a 301 (or 302) redirect to your bare domain, example.com, customers who try to access www.example.com will instead load example.com, bypassing PageSpeed Service (PSS) and going directly to your servers. As a result, none of your pages are optimized by PSS (because they are loading example.com via your servers). To receive the benefits of PSS, you must remove the 301 redirect from your full domain to your bare domain. Here are some tips to remove the redirect in common web hosting software:
  • Apache: Open your .htaccess file, and search for the string “301”. Delete the corresponding line after you have verified that it is the correct line.
  • WordPress: If you have a redirection plugin, please consult the instructions associated with your plugin. Otherwise, open your .htaccess file, and search for the string “301”. Delete the corresponding line after you have verified that it is the correct line.
  • PHP: Search and remove the following lines from your code base:
      Header ("HTTP/1.1 301 Moved Permanently");
      Header ("Location: http://example.com");
     Note: Replace http://example.com with your domain.
  • IIS: In internet services manager, right click on the file or folder for your full domain. Select the radio titled "A directory located on this computer"
If you would like to guarantee the benefits of PSS for all your website visitors, we recommend you set up a 301 redirect from your bare domain to your full domain. You can learn more at this FAQ.
Does PageSpeed Service support HTTPS?
PageSpeed Service currently offers support for HTTPS traffic. SSL support requires a special setup, so please contact pss-support@google.com to receive the detailed instructions.
Please note that once a domain is CNAME'd to Google, it is not possible to simply exclude HTTPS traffic from PageSpeed Service. To achieve that you need to serve your HTTPS traffic from a separate sub-domain that is not CNAME'd to Google. For example, if your site is www.example.com, then serve HTTPS traffic from secure.example.com.
If the domain being CNAME'd to Google supports other services (e.g. ssh, ftp etc.), those services will no longer work.
Does PageSpeed Service use SPDY?
Yes! PageSpeed Service automatically uses SPDY for all HTTPS connections served through Google for supported versions of Chrome, Firefox, and Opera, among others.
My DNS hosting provider or registrar does not support DNS TXT record creation. Can I still verify ownership for using PageSpeed Service?
PageSpeed Service can only be used after verification of ownership using the DNS TXT record creation method explained here. As mentioned here, you cannot use other verification methods and hence, cannot use PageSpeed Service.
My website is hosted on Blogger, Google Sites or Google App Engine. Can I still use PageSpeed Service?
If your website is hosted on Google App Engine, please use its Administration Console to enable PageSpeed Service by following these instructions.
Websites or domains hosted on Blogger or Google Sites are currently not supported by PageSpeed Service. Neither the serving domain, nor the origin server can be hosted on one of these products. Such sites will already be CNAME'd to ghs.googlehosted.com or ghs.google.com. If your site is not already CNAME'd to one of these two domains but you still get this error, it is quite likely that you have a dangling entry associated with one of these products. Please follow these instructions to delete the dangling entry and then try again.
Does PageSpeed Service support flash, streaming audio and video content?
Yes. PageSpeed Service supports Flash, streaming audio and video content. However PageSpeed Service does not necessarily speed up rendering of such media files. Please note that these files are subject to the file size limits mentioned below.
What is the maximum file size that I can use with PageSpeed Service?
Files greater than 64MB in size are currently not supported by PageSpeed Service. As a workaround, you can move large resources to a separate domain that is not CNAME'd to Google. For example, if your site is www.example.com, then serve large files from large.example.com.
What is the maximum POST request size that I can use with PageSpeed Service?
POST requests of size greater than 6MB are currently not supported by PageSpeed Service.
Does PageSpeed Service support long lived HTTP connections?
HTTP connections from PageSpeed Service are long lived. PageSpeed Service fetches the entire content and then streams it out. Additionally, we have certain timeouts while fetching from origin server and on serving.
Does PageSpeed Service support IPv6 for end users?
Yes. By default, IPv6 access to the serving domain is enabled only for end users in the Google over IPv6 program. To find out how to enable IPv6 for all users, or disable IPv6 for all users, see the instructions on IPv6 hosting.
Does PageSpeed Service support IPv6-only origin servers?
At this time, PageSpeed Service does not support origin servers that have only an IPv6 address. You can however configure your origin server to have an IPv4 and an IPv6 address by providing a DNS A-Record and an AAAA-Record. If any resource on the page is served from an external IPv6-only domain, the page will continue to work, although the resource will not be rewritten.
Does PageSpeed Service respect Vary headers?
PageSpeed Service does not respect Vary headers. As a workaround, you can embed different URLs for different Vary parameters, such as User-Agent. Alternately, you can serve out such resources with private Cache-Control headers, but please note that you will not see benefits of PageSpeed Service rewriting for such resources.
Are Ads and 3rd party social widgets proxied through Page Speed Service?
Ads and 3rd party widgets are usually present as iframes, and PageSpeed Service does not modify them. However, some of these may be injected through JavaScript, which might be proxied by PageSpeed Service. Please refer to the limitations of Proxy JavaScript for possible breakages. Please add any such domains/urls to the blacklist in the Google APIs Console to prevent this from happening.
What is the impact of using PageSpeed Service on image search ranking?
As a result of using PageSpeed Service, some images may change to a new location and may get recompressed. This means that search engines such as Google Image Search can take some time to find and update the index with the new image locations. During that time, your image search rankings can be affected by the move to different URLs.
I get the error Unable to serve content since the server is in a blacklisted country. What should I do?
PageSpeed Service does not serve content if the origin server for your site is hosted in one of the blacklisted countries. Currently the list of blacklisted countries is:
  • Cuba
  • Iran
  • Myanmar
  • North Korea
  • Sudan
  • Syria

You should move your servers to a different country if you want to use PageSpeed Service.

Is PageSpeed Service available to websites hosted in China?
Yes. However, at times we observe that network traffic from mainland China to Google's servers is interrupted due to factors beyond Google's control.

Operating your Site with PageSpeed Service


The console page is at https://code.google.com/apis/console/?#:pagespeedservice. This is the main point of entry for managing PageSpeed Service with your site. We strongly recommend bookmarking this page for easy future reference.
My site looks different than I expected. How can I tell whether the problem is in my original site or if it is due to a conflict with using PageSpeed Service?
If your site looks different than you expect (eg. new content is not getting updated, or parts of the page don't look right, etc.) we recommend the following:
  1. Check whether the problem on the page is because of a conflict with your current rewriter configuration. To do this, clear your browser cache, and then visit your page after appending the string "?PageSpeed=off" to its URL, such as http://www.example.com/?PageSpeed=off or http://www.example.com/about.html?PageSpeed=off. This added URL parameter accesses the page without modification by PageSpeed Service rewriters.

    If the error is not visible at this modified URL, then there is likely a conflict with one or more rewriters that you are using. Try to identify the offending rewriter by modifying your rewriter configuration and previewing your site with select rewriters disabled. More information is at at the Configure Rewriters page. Write to us if you get stuck or would like us to investigate a conflict with a rewriter.

    If the error is still visible at the modified URL, the problem is either at your origin host or is due to something that is preventing PageSpeed servers from fetching or serving content correctly from your site.

  2. Check your page on the origin host to see if the error is visible there. Use the instructions below to configure your browser to view your site at the origin host without any influence from PageSpeed Service, even if the site is currently setup with the service. Note that if your machine requires a proxy to access the internet, these methods may not work for you; so write to us for help.

    The instructions below assume that your serving domain is www.example.com and your origin host is origin.example.com. If the error is still visible on the page after following the instructions, then its source is the origin host and not PageSpeed Service.

Some requests to my site seem to fail randomly when using PageSpeed Service. How do I fix this?
Some hosting providers configure their servers by default to throttle requests based on the user's IP address. When using PageSpeed Service, requests to your origin server will always be from Google servers, which can lead to blocking of Google server IP addresses. This results in seemingly random failures while accessing your pages. This can be fixed by configuring your origin server to use the end user's IP address stored in the X-Forwarded-For HTTP header. See this FAQ entry for details.
After moving to PageSpeed Service, my users complain that they cannot login to my site or get unexpectedly logged out. How can I fix this?
The most common cause for this problem is the IP address checks in your reference site that validate the user's IP address and checks that it doesn't change across a session. Since your site is now CNAMEd to Google, the client IP address that is seen by your reference servers is Google's IP address, which may vary across a session. The actual client IP address can now be found in the X-Forwarded-For header. Please use this IP address if your server places any of the above restrictions for login to your site. See this FAQ entry for details.
How do I know the client IP address for my users' requests?
PageSpeed Service serves webpages on your behalf to your customers by retrieving original content from your servers. As a result, all requests to your origin server will be from Google's IP addresses. To get the IP address of the user on your origin server, we recommend you use the value stored in the X-Forwarded-For HTTP header. Here are some tips to correctly configure your host and retrieve the X-Forwarded-For header value in common web hosting software:
  • (Required) Server Software: The following server systems are responsible for managing incoming connections to your origin server.
    • Apache: Install the mod_remoteip plugin. Please make sure to modify your configuration file (/etc/httpd/conf/httpd.conf) with the updated configuration:
      • LoadModule remoteip_module /usr/lib64/httpd/modules/mod_remoteip.so
        RemoteIPHeader X-Forwarded-For
        # Google PageSpeed Service, ref http://support.google.com/a/bin/answer.py?hl=en&answer=60764
        RemoteIPInternalProxy 0.0.0.0/0 1.1.1.1/1 2.2.2.2/2
      • Note: The above IP ranges are placeholders. Please follow the steps listed in this FAQ to find the appropriate list of IP addresses to enter above
    • Nginx: Install the ngx_http_realip_module plugin.
    • IIS: Install the Application Request Routing (ARR) module. After installing ARR, please use the HttpContext.Current.Request.Headers["X-Forwarded-For"] variable.
  • (Recommended) Server Scripting Language: To maintain full functionality of your existing site, we recommend using the following server variables to extract the original client's IP address in your code.
    • PHP: Use the server variable $_SERVER['HTTP_X_FORWARDED_FOR'].
    • ASP: Use the variable Request.ServerVariables("HTTP_X_FORWARDED_FOR").
  • (Recommended) Content Management Systems: If you are also using a content management system, we recommend making the following changes, in addition to the ones above.
    • Wordpress: Install the Reverse-Proxy Comment IP Fix plugin
    • phpBB: Turn off Session IP validation checks in the Admin->General->Server Configuration->Security Settings and turn ON the VALIDATE X_FORWARDED_FOR HEADER as described in the phpBB documentation.

Here are some common scenarios where you should use the client IP address in your origin server:

  • Serve different content based on the user's location, as determined by the IP address.
  • Check if a logged-in user's session requests are coming from the same machine. This is common in sites such as forums and message boards.
  • Abuse prevention by blocking requests when a large number of them come from a single IP address.
If any of the above situations apply to your site, we strongly recommend that you change your origin server to use the X-Forwarded-For header. There are no known risks to making this change, even if your site does not currently use the user's IP address, so we recommend making these changes anyway in case one of these situations apply in the future.
What should I do if some of my pages are broken with PageSpeed Service?
You can blacklist these pages from the Rewriter Settings pane in the Google APIs Console, so PageSpeed Service does not rewrite them. If there is a problem affecting a large number of pages, disable all the rewriters and then try enabling them one after another to narrow down the problem.
Why do I see lots of errors for my site in the console?
Please make sure that you are interpreting the errors plot in the dashboard corectly. See the description of the plots in the Errors pane.
Why are some of my users getting a 523 error code when accessing my page?
PageSpeed Service returns a 523 error code when requests are blocked due to rules specified by you in the Block Requests pane. Verify the rules specified there to ensure that no rule exists which may be blocking genuine requests.
What are the default set of rewriters that will be enabled for my pages?
The default set of rewriters are listed here.
Can I configure the rewriters enabled for my page?
Please use the Rewriter Settings pane in the Google APIs Console to configure the rewriters for your webpages.
What statistics are available for my traffic?
Look at the Overview pane in the Google APIs Console to view traffic and latency statistics for your webpages.
How do I view my original site after I start using PageSpeed Service?
You can preview contents of your original site by replacing pagespeed.googlehosted.com with your origin server (say origin.example.com) in the preview instructions. Please note that the browser proxy approach may not work with all servers, so please use the /etc/hosts file modification approach in such cases.
How do I find out what is the speed up after I start using PageSpeed Service?
Please follow the instructions listed here to measure speed up of your site after you have started using PageSpeed Service.
How can I prevent PageSpeed Service from caching responses during staging and development?
The lifecyle of a webpage is typically as follows.
  1. Build the webpage on your local machine, and verify functional correctness.
  2. Push your changes to a live staging site.
  3. Make your changes live to all users.
During staging (step 2), you typically don't want pages to be cached by PageSpeed Service. You can achieve this by setting the Cache-Control http header of the resources (such as images, JavaScript, CSS) to no-cache. Alternately, you can also change the file names of resources, but it may be laborious to do this repetitively.
I need to know what Google PageSpeed Service's IPs are in order to make my site function properly. What are your IPs?
You can find Google's current IP address ranges by following the instructions listed in this FAQ. Please note that Google's IPs are constantly changing and that you may need to update your records as Google's IP address ranges change.
I see the error "This host is possibly misconfigured. If you own this domain, please consult this FAQ" when loading a page on my site. How do I fix this?
This error is seen when the serving domain has been CNAME'd to ghs.googlehosted.com or ghs.google.com and one of the following conditions is true:
  1. Origin server has not been provided in the configuration. Please ensure that your reference domain is setup correctly.
  2. DNS resolution of the origin server points to ghs.googlehosted.com or ghs.google.com directly or transitively. As mentioned in our Limitations section, we currently do not support domains that are already CNAME'd to ghs.googlehosted.com or ghs.google.com.
I see the error "Fetching content failed due to a DNS error. If you own this domain, please consult this FAQ" when loading a page on my site. How do I fix this?
This error is seen when the origin server provided in the configuration does not resolve to any IP address. Please ensure that your reference domain is setup correctly.
I see the error "Fetching of original content failed due to Proxy Publisher Failure <Error Name>. If you own this domain, please consult this FAQ." when loading a page on my site. How do I fix this?
To fix this issue, please implement the X-Forwarded-For header. This error occurs when PSS cannot establish a stable connection with your origin server, likely because your origin server is now seeing a large number of requests coming from a small number of IP addresses (Google's servers). Below are some of errors PSS encountered when connecting to your origin server.
  • TIMEOUT: Connection from PSS server to the origin server timed out.
  • CLOSED: Origin server closed the connection.
  • DISCONNECTED: The origin server disconnected the connection to PSS server.
  • CONNECTION_ERROR: PSS server could not connect to the origin server.
Please note that if implementing the X-Forwarded-For header does not solve this error, some of these errors may be transient errors served by your hosting provider. In this event, please contact your hosting provider to fix the situation appropriately.
My AJAX requests don’t seem to be working any more! What can I do to fix this issue?
AJAX requests have two components:
  • The Client: This is the page that the customer sees, such as www.example.com/ajaxpage.html. When an AJAX request is made, the client page will send a request to the AJAX service.
  • The Service: The service, such as www.example.com/ajaxservice.php, handles incoming AJAX requests on the website's server.
Most common AJAX libraries will set the X-Requested-With header set to XMLHttpRequest for their AJAX requests from the client to the service. If PageSpeed Service (PSS) detects this header, it will automatically disable the appropriate filters. However, not all websites will send AJAX requests with the X-Requested-With header set to XMLHttpRequest. As a result, PSS does not automatically disable the necessary filters, which may result in broken AJAX requests.

To fix this issue, we recommend one of the following:
  • Blacklist the AJAX service, www.example.com/ajaxservice.php.
  • Update your existing AJAX requests to include the X-Requested-With header set to XMLHttpRequest.
Does PageSpeed Service work with Akismet plugin?
Please see the X-Forwarded-For FAQ to make sure that your system uses the correct IP from the X-Forwarded-For header.
I am on WordPress and use W3 Total Cache as a caching plugin. Will it work with PageSpeed Service?

PageSpeed Service (PSS) and W3 Total Cache (W3TC) are largely complimentary to each other, and we recommend using the two together. There is some overlap between PSS and W3TC. (For example, both merge and combine JavaScript and CSS files.) But, for the most part PSS and W3TC each provide optimizations that the other does not.

For example, W3 Total Cache offers a number of low level WordPress specific optimizations among other improvements. W3TC achieves this by caching the results of a number of internal WordPress calls. This plugin is able to provide these features because it is optimized specifically for WordPress sites.

Meanwhile PageSpeed Service complements W3 Total Cache with a number of other features, such as delivering content to your end users via Google’s infrastructure, DDoS defense capabilities, and advanced rewriters, such as image transcoding and Cache and Prioritize Visible Content.

If you choose to use W3 Total Cache with Google PageSpeed Service, we want to point out that your site will now have two layers of caching, one from each W3TC and PSS. If you make changes to your site and you do not see the changes immediately, we recommend flushing the cache for both W3TC and PSS.

I am on Joomla and am having trouble accessing my CPanel. Help!
This happens because the Joomla CPanel URL, eg. www.example.com/cpanel redirects to a non-standard port. Because PageSpeed Service only works on a small set of port numbers, we recommend that you access your cpanel via your origin domain, eg. origin.example.com/cpanel. Note: please replace origin.example.com with your true origin domain as specified in this FAQ.
Whom do I call in case my site breaks?
We hope you don't run into this, but if it does, please contact us through the available support means we have listed in the resources page.
Why do I see duplicate URLs in my Webmaster Tools account with the PageSpeed= URL parameter?
Webmaster Tools can detect when URLs with PageSpeed Service parameters like www.example.com/?ModPageSpeed=off and www.example.com/?ModPageSpeed=noscript have the same content as your original www.example.com page. Sometimes, these detections may be listed in your site's HTML Improvements report for your approval. If this occurs, we recommend explicitly marking them as duplicates to remove them from the report using the following easy steps:
  1. Login to your Webmaster Tools account and click on your site.
  2. Click on the Configuration menu on the left, and then select URL Parameters
  3. Click Add Parameter
  4. In the form, type PageSpeed in the 'Parameter' field. Be careful to use the same capitalization, as it is case-sensitive.
  5. Select 'No' from the drop-down menu for 'Does this parameter change content?'
  6. Click the Save button.
This will also ensure that URLs with and without the PageSpeed parameter are handled correctly by the crawler.

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.