• Resolved jlebouch76

    (@jlebouch76)


    Hello,

    When i tested my dev site on GTmetrix, i saw my score for “reduce DNS lookups” was F, i wanted to use the setting of pre-fetching the DNS for external domains. For testing, I entered the following domains in the “environment optimization”:
    //script.hotjar.com
    //connect.facebook.net
    //maps.googleapis.com
    //cdn-app.continual.ly
    //cdn.statically.io
    //fonts.googleapis.com

    But i don’t see any change in my Ylow score in GT metrix (even after clearing my cache).

    I’m not sure if i’m doing everything right. I would appreciate if you would help me. Thanks.

    My dev platform is Oxygen Builder.

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Hristo Pandjarov

    (@hristo-sg)

    SiteGround Representative

    DNS Pre-fetch rules are correctly rendered on your site. However, there are more that aren’t added there. I think it’s the way the tool reports issues – not only the ones that are not prefetched put pretty much all external domains you have.

    Hello,

    Could you please check if DNS pre-fetch is working on my site (electricvehicleweb (dot) in), we have included –

    //google-analytics.com

    //www.youtube-nocookie.com

    //feeds.feedburner.com

    //www.instagram.com

    //pinterest.com

    //twitter.com

    //www.facebook.com

    //youtube.com

    We primarily use Facebook embed, Twitter embed, Youtube embed (youtube-nocookie.com embed) on our blog posts and Google Analytics.

    I did not notice any changes in the loading, hence could you please check if this is working, and if there anything that we are doing incorrectly?

    Plugin Author Hristo Pandjarov

    (@hristo-sg)

    SiteGround Representative

    I can see the proper lines added to your site:

    <link rel=”dns-prefetch” href=”//youtube.com” data-set-by=”SG Optimizer”/>
    <link rel=”dns-prefetch” href=”//facebook.com” data-set-by=”SG Optimizer”/>
    <link rel=”dns-prefetch” href=”//twitter.com” data-set-by=”SG Optimizer”/>
    <link rel=”dns-prefetch” href=”//pinterest.com” data-set-by=”SG Optimizer”/>
    <link rel=”dns-prefetch” href=”//instagram.com” data-set-by=”SG Optimizer”/>
    <link rel=”dns-prefetch” href=”//feeds.feedburner.com” data-set-by=”SG Optimizer”/>
    <link rel=”dns-prefetch” href=”//youtube-nocookie.com” data-set-by=”SG Optimizer”/>
    <link rel=”dns-prefetch” href=”//feedburner.google.com” data-set-by=”SG Optimizer”/>
    <link rel=”dns-prefetch” href=”//google-analytics.com” data-set-by=”SG Optimizer”/>

    This is not an optimization that you will notice right away since you most probably already have that hostname resolved and cached locally.

    Thread Starter jlebouch76

    (@jlebouch76)

    Hello,

    I’m still talking about the domain i sent you in my first message.

    I did setup the pre-dnsfetch to the 14 external domains (listed below). I don’t get the impression that it is working properly because when running GTmetrix, or Lighthouse Tests, i see that it is only working on 2 domains. Also when i look at the source code with Chrome Developer tools, i see the same thing. According to me, it’s only working for (but not even set by SG Optimizer):
    <link rel=’dns-prefetch’ href=’//fonts.googleapis.com’ />
    <link rel=”dns-prefetch” href=”https://cdn.statically.io/&#8221; >

    What could cause this? Am I right with my conclusion?
    Could a command line in .htaccess or a particular option in my Ninja Firewall interact with that?

    List of domains i entered in SG Optimizer (pre-dnsfetch feature):
    //c9.radioboss.fm
    //googletagmanager.com
    //youtube.com
    //script.hotjar.com
    //s.ytimg.com
    //maps.gstatic.com
    //in.hotjar.com
    //font.gstatic.com
    //app.continual.ly
    //connect.facebook.net
    //maps.googleapis.com
    //cdn-app.continual.ly
    //cdn.statically.io
    //fonts.googleapis.com

    • This reply was modified 4 years, 3 months ago by jlebouch76.
    Plugin Author Hristo Pandjarov

    (@hristo-sg)

    SiteGround Representative

    Open the site html source and see the lines added for those domains.

    Thread Starter jlebouch76

    (@jlebouch76)

    I did exactly that and i found that only 2 domains were dns-prefetch. I mentioned those is my message few minutes ago.

    Plugin Author Hristo Pandjarov

    (@hristo-sg)

    SiteGround Representative

    Which domain are you talking about? You have specified https://happynew.radiojyoti.com in your first ticket and in that domain all the lines are properly rendered:

    <!– END OF WP_HEAD() –>
    <link rel=”dns-prefetch” href=”//fonts.googleapis.com” data-set-by=”SG Optimizer”/>
    <link rel=”dns-prefetch” href=”//cdn.statically.io” data-set-by=”SG Optimizer”/>
    <link rel=”dns-prefetch” href=”//cdn-app.continual.ly” data-set-by=”SG Optimizer”/>
    <link rel=”dns-prefetch” href=”//maps.googleapis.com” data-set-by=”SG Optimizer”/>
    <link rel=”dns-prefetch” href=”//connect.facebook.net” data-set-by=”SG Optimizer”/>
    <link rel=”dns-prefetch” href=”//script.hotjar.com” data-set-by=”SG Optimizer”/>
    <link rel=”dns-prefetch” href=”//app.continual.ly” data-set-by=”SG Optimizer”/>
    <link rel=”dns-prefetch” href=”//font.gstatic.com” data-set-by=”SG Optimizer”/>
    <link rel=”dns-prefetch” href=”//in.hotjar.com” data-set-by=”SG Optimizer”/>
    <link rel=”dns-prefetch” href=”//maps.gstatic.com” data-set-by=”SG Optimizer”/>
    <link rel=”dns-prefetch” href=”//s.ytimg.com” data-set-by=”SG Optimizer”/>
    <link rel=”dns-prefetch” href=”//script.hotjar.com” data-set-by=”SG Optimizer”/>
    <link rel=”dns-prefetch” href=”//youtube.com” data-set-by=”SG Optimizer”/>
    <link rel=”dns-prefetch” href=”//googletagmanager.com” data-set-by=”SG Optimizer”/>
    <link rel=”dns-prefetch” href=”//c9.radioboss.fm” data-set-by=”SG Optimizer”/>

    Thread Starter jlebouch76

    (@jlebouch76)

    Yes it is working…. but I can’t figure out why i can see those 14 domains when i log out from the backend. Whereas when i’m logged in as Admin, i only see 2 domains listed in the source code.

    Plugin Author Hristo Pandjarov

    (@hristo-sg)

    SiteGround Representative

    Because it goes through the optimization parser which does not work for admins / logged in users. Open an incognito tab and you will see all the domains.

    Thread Starter jlebouch76

    (@jlebouch76)

    oh that’s why. i always do my development work with Incognito tab, so that’s why i didn’t see the difference.

    Does this mean that if i want to check all effects of SG optimizer, i need to be logged out completely?
    What are the features that would not work for Admin or logged in users?

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Not working: DNS Pre-fetch for External Domains’ is closed to new replies.