Title: 301 Redirect Loop
Last modified: February 12, 2021

---

# 301 Redirect Loop

 *  Resolved [stinamariechris](https://wordpress.org/support/users/stinamariechris/)
 * (@stinamariechris)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/301-redirect-loop/)
 * My website is hosted on Siteground and I use Siteground’s SG Optimizer. If I 
   have dynamic caching turned on in my caching, my website will periodically fall
   into a 301 redirect loop pointing to Hubspot’s tracking URL (/?utm_source=adwords&
   utm_medium=ppc&utm_campaign=Single%20Keyword%20Ads&utm_term=wedding%20venue&hsa_acc
   =5162376587&hsa_cam=1667436666&hsa_grp=64019495026&hsa_ad=392861907725&hsa_src
   =g&hsa_tgt=kwd-19324850&hsa_kw=wedding%20venue&hsa_mt=b&hsa_net=adwords&hsa_ver
   =3&gclid=EAIaIQobChMIh87Tqd3Y7gIV4cmUCR18vABOEAAYASAAEgKP-_D_BwE)
 * After a lot of troubleshooting, it looks like its a combination of SG Optimizer,
   PHP 7.4 and Hubspot. If I downgrade to 7.3, the issue is resolved and if I turn
   off dynamic caching in SG Optimizer, the issue is resolved. Do you have any ideas
   why this would be happening? Thank you for your help!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2F301-redirect-loop%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [alortega](https://wordpress.org/support/users/alortega/)
 * (@alortega)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/301-redirect-loop/#post-14042198)
 * Hello [@stinamariechris](https://wordpress.org/support/users/stinamariechris/),
 * I have been inspecting the site you provide and I cannot see the URL you have
   added. Could you point me out to the section where you are experiencing the issue?
 * Also the tracking URL from hubspot starts with `https://track.hubspot.com` and
   should never return a 301
 * Kind regards
 *  Thread Starter [stinamariechris](https://wordpress.org/support/users/stinamariechris/)
 * (@stinamariechris)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/301-redirect-loop/#post-14042560)
 * Thank you for getting back to me. If someone clicks on my google ads or facebook
   ads link, Hubspot ads the UTM parameters to my homepage:
 * [https://feastcaterers.com/?utm_source=adwords&utm_medium=ppc&utm_campaign=Single%20Keyword%20Ads&utm_term=wedding%20venue&hsa_acc=5162376587&hsa_cam=1667436666&hsa_grp=64019495026&hsa_ad=392861907725&hsa_src=g&hsa_tgt=kwd-19324850&hsa_kw=wedding%20venue&hsa_mt=b&hsa_net=adwords&hsa_ver=3&gclid=EAIaIQobChMIh87Tqd3Y7gIV4cmUCR18vABOEAAYASAAEgKP-_D_BwE](https://feastcaterers.com/?utm_source=adwords&utm_medium=ppc&utm_campaign=Single%20Keyword%20Ads&utm_term=wedding%20venue&hsa_acc=5162376587&hsa_cam=1667436666&hsa_grp=64019495026&hsa_ad=392861907725&hsa_src=g&hsa_tgt=kwd-19324850&hsa_kw=wedding%20venue&hsa_mt=b&hsa_net=adwords&hsa_ver=3&gclid=EAIaIQobChMIh87Tqd3Y7gIV4cmUCR18vABOEAAYASAAEgKP-_D_BwE))
 * I had to downgrade to PHP 7.3 so the issue isn’t happening right now, but when
   you previously would go to the homepage of my website, feastcaterers.com, there
   would be a 301 to the link above which would create a redirect loop.
    -  This reply was modified 5 years, 3 months ago by [stinamariechris](https://wordpress.org/support/users/stinamariechris/).
 *  Thread Starter [stinamariechris](https://wordpress.org/support/users/stinamariechris/)
 * (@stinamariechris)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/301-redirect-loop/#post-14043169)
 * Actually the issue happened on PHP 7.3 as well today and it went away when I 
   emptied my cache. I’m not sure what’s causing the redirect, it comes back several
   times a day.
 *  [alortega](https://wordpress.org/support/users/alortega/)
 * (@alortega)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/301-redirect-loop/#post-14050510)
 * Hello [@stinamariechris](https://wordpress.org/support/users/stinamariechris/),
 * The issue does not seems to be related to the PHP version but rather how the 
   siteground cache optimizer is working.
 * If the 301 redirect happens, as you mentioned on the URL ([https://feastcaterers.com/?utm_source=adwords&utm_medium=ppc&utm_campaign=Single%20Keyword%20Ads&utm_term=wedding%20venue&hsa_acc=5162376587&hsa_cam=1667436666&hsa_grp=64019495026&hsa_ad=392861907725&hsa_src=g&hsa_tgt=kwd-19324850&hsa_kw=wedding%20venue&hsa_mt=b&hsa_net=adwords&hsa_ver=3&gclid=EAIaIQobChMIh87Tqd3Y7gIV4cmUCR18vABOEAAYASAAEgKP-_D_BwE](https://feastcaterers.com/?utm_source=adwords&utm_medium=ppc&utm_campaign=Single%20Keyword%20Ads&utm_term=wedding%20venue&hsa_acc=5162376587&hsa_cam=1667436666&hsa_grp=64019495026&hsa_ad=392861907725&hsa_src=g&hsa_tgt=kwd-19324850&hsa_kw=wedding%20venue&hsa_mt=b&hsa_net=adwords&hsa_ver=3&gclid=EAIaIQobChMIh87Tqd3Y7gIV4cmUCR18vABOEAAYASAAEgKP-_D_BwE))
   that is not related to HubSpot tracking script but your own service. The UTM 
   parameter is appended by Google ads itself, HubSpot just reads the URL which 
   which the page is loaded.
 * I will mark this issue as resolved but do not hesitate to be in touch if you 
   have any other enquiry.
 * Kind regards,
    Alvaro.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘301 Redirect Loop’ is closed to new replies.

 * ![](https://ps.w.org/leadin/assets/icon-256x256.png?rev=3041936)
 * [HubSpot All-In-One Marketing - Forms, Popups, Live Chat](https://wordpress.org/plugins/leadin/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/leadin/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/leadin/)
 * [Active Topics](https://wordpress.org/support/plugin/leadin/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/leadin/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/leadin/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [alortega](https://wordpress.org/support/users/alortega/)
 * Last activity: [5 years, 3 months ago](https://wordpress.org/support/topic/301-redirect-loop/#post-14050510)
 * Status: resolved