• Resolved Lenne86

    (@lenne86)


    Hello,
    I’m using Jetpack on my website, I checked and it is properly connected, and Jetpack debug tool retuns everything is ok too.

    I’m also using quic.cloud cdn service and allowed Jetpack inside security settings. Quic.cloud is connected to the website with Litespeed cache plugin and change of nameservers.

    If I try to visit my website from mobile or desktop by writing the url, it works properly.

    Now, I’m using Google Merchant to show my woocommerce products on Google Shopping tab. When I try to click on one of my products from Google Shopping list, I got unexpected results: from desktop it takes a bit to load, but it works properly while from mobile I get a “TOO MANY REDIRECTS ERROR”. I tried with different devices and from different connections/places/ips. I always got this error on multiple products, only from mobile and only from Google Shopping service.

    I tested my website mobile usage with Google tools and these are the results https://search.google.com/test/mobile-friendly/result?id=GZCTsqI4LEAdsBvup2dJmQ

    The result say the page is ok, but it returns a redirect error:
    https://stats.wp.com/s-202313.js'%20defer%20
    and a mixed content error:
    Mixed Content: The page at 'https://trovavisure.it/' was loaded over HTTPS, but requested an insecure script 'https://wordpress.com/s-202313.js'%20defer%20/'. This request has been blocked; the content must be served over HTTPS.

    How do I fix this? Why the script was http and not https, and why the https version of the script returns a redirect error?

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Paulina H. (a11n)

    (@pehaa)

    Hey there,

    Typically, Jetpack adds a stats script like so (please note that the number regularly changes):

    <script defer="" src="https://stats.wp.com/s-202313.js" id="woocommerce-analytics-js"></script>

    If you try to access https://stats.wp.com/s-202313.js directly, you will notice that you have access to the script.

    I checked your site and found instead:

    <script defer="" type="text/javascript" src="https://stats.wp.com/s-202313.js'%20defer%20" '="" id="woocommerce-analytics-js"></script>

    If you try to access the URL from the src attribute you get 404 error and are redirected to https://wordpress.com/s-202313.js’%20defer%20%22/ – that’s how we handle 404 errors.

    I suspect that the %20defer%20" part is added by a performance plugin (likely Performance Lab in your case).

    Please temporarily deactivate Performance Lab, clear the cache if you have any cache solution, and check in your browser’s developer tools (right-click and Inspect) if the problem persists – you can refer to this screenshot https://d.pr/i/yueQqn

    Hope that helps! Let us know if you have further questions.

    Thread Starter Lenne86

    (@lenne86)

    Hi Paulina,
    thank you for your answer, I removed Performance Lab plugin and I can’t find anymore the %20defer%20 code on my source page.

    However, if I make a test of the mobile page https://trovavisure.it, the test still returns the redirect error, but not the mixed content error.

    https://search.google.com/test/mobile-friendly/result?id=j4ZBkFLO-nYVbibOklRCuQ

    Plugin Support Ajay Kumar Jain

    (@akumarjain)

    I added the reply twice by mistake. Please see the reply below.

    • This reply was modified 1 year, 11 months ago by Ajay Kumar Jain. Reason: Sent twice by mistake
    Plugin Support Ajay Kumar Jain

    (@akumarjain)

    Hi @lenne86!

    I checked the Google Search Console link that you shared, and I am not seeing the error you mentioned. Could you recheck, and let us know if you are still seeing the error on your end?

    Plugin Contributor Stef (a11n)

    (@erania-pinnera)

    Hi there @lenne86,

    It’s been one week since this topic was last updated. I’m going to mark this thread as solved. If you have any further questions or need more help, you’re welcome to open another thread here. Cheers!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Redirect and mixed content errors with stats.wp.com script’ is closed to new replies.