Search code examples
pagespeed-insights

Why is subdomain part of calculation pagespeed


Why is my subdomain having a large effect on my Google PageSpeed?

On my homepage there is a link to my subdomain, which is a client portal. First I used a direct link to https:// clients. mydomain. com but as a test I've created a redirect page as https:// mydomain. com/clients which has the meta tag robots nofollow noindex and the page is redirecting to the subdomain. When I run pagespeed analysis, there is no difference for both options and my site's score is only 40 and mainly because of scripts, css and caching issues of the subdomain. There is no option or need to update any of this.

Is there a way to prevent this? DNS is handled by cloudflare.

Victor


Solution

  • So the problem is not the link in the footer but your call to action / proposal request form.

    You contact form is hosted on your sub domain and you load it into an iframe.

    As such it is perfectly valid that all of the CSS and JS that would show on that page if you visited directly is also loaded into your main site within the iframe and as such contributes to page load times, total blocking time etc.

    The simplest solve would be to remove the iframe from your "request free proposal" modal.

    Then when someone clicks on "Request Free Proposal" you would add the iframe via JavaScript.

    Obviously that is the quick fix and not the ideal. Ideally you would have the form as part of your main page and submit from there.

    Either way the answer is to remove your iframe in the "request free proposal" page and then there will be no assets loaded from your subdomain.