Viewing 15 replies - 16 through 30 (of 32 total)
  • Thread Starter stinamariechris

    (@stinamariechris)

    @sageallott My issue was resolved by disconnecting Google and Facebook from Hubspot and removing their UTM parameters that they automatically place in your Google Ads settings and Facebook settings (you have to do this manually even if you disconnect Hubspot). I was suspicious that a space in the URL was causing the issue, because when I remove the Term UTM Parameter (which would add something like utm_term=wedding venue to the URL) I would have the issue. But to be safe, I completely removed all Hubspot’s UTM parameters. What’s the URL that’s causing the redirect loop? Hubspot will track just fine without their added parameters (I add my own) and I still use it to track where inquires come from.

    @stinamariechris @juhl Thank you both for your responses. We may need to consider switching hosting services as well. The site has crashed twice today already, even after disconnecting Google Ads/HubSpot, removing UTM parameters, and disabling dynamic caching.

    The HubSpot URL in question is this: /?utm_campaign=Fast%20Pack%20-%20New%20Customer%20Acq.&utm_source=hs_email&utm_medium=email&_hsenc=p2ANqtz–2lWbh_uSo6-04w6HEdXdgldIb8d2030xewRnSWQqIQfgCxUIaojl_RFselKSDTq4AqjQQ&wpv_view_count=5712

    This is connected to a new workflow in HubSpot, but we’ve never had a problem with workflow or campaign tracking in HubSpot before.

    Thread Starter stinamariechris

    (@stinamariechris)

    @sageallott Is it crashing? Or stuck in a redirect loop? Can you try a test and remove the spaces between your UTM Campaign Name? Change it to Fast_Pack_New_Customer_Acq to remove all spaces in the name. The connection between @juhl’s url, mine and yours is that we all had spaces in the UTM parameters generated by Hubspot. My Hubspot URLs that did not have spaces did not have redirect issues.

    @sageallott @stinamariechris @juhl Finally found some others with the same problem of a REDIRECT LOOP. I’m not crazy after all.

    We are getting redirects happening (when not logged in). It appears to cache 1 random user URL from FB ads campaign and then everyone gets served that URL – and it redirects.

    Using: siteground, cloudflare.

    Only after we Clear the Dynamic Cache the problem resolves. However – we only find out when a customer complains or alerts us.

    Purging Cloudflare cache doesn’t impact it.

    Using the cache url excluder I’ve added url with wild cards to avoid them:
    https://www.MYSTORE.COM/*?fbclid=*

    This seems to work when testing in the excluder. Now to just wait and see if it is working in the wild for customers.

    I’m wondering if it could be related to the Cloudflare Caching Level. I’ve got this set on Aggressive. The basic setting will cache most static resources (i.e., CSS, images, and JavaScript). The aggressive setting will cache all static resources, including ones with a query string. The simplified setting will ignore the query string when delivering a cached resource.

    UPDATE:
    Spoke with SG support and they offered the following:

    Let’s fix it by adding a special rule that should stop the caching from caching those URLs and cause the issues
    Please, access your Site Tools -> Site -> File Manager -> public_html and find your .htaccess. In it paste this code:

    Header set Cache-Control "no-cache, private"

    Plugin Author Stoyan Georgiev

    (@stoyangeorgiev)

    Hey there @clickingclients,

    Could you please provide an URL, so we can check this issue.

    Kind regards,
    Stoyan

    @stoyangeorgiev Thank you.
    I’ll email support rather than posting it here.

    Plugin Author Stoyan Georgiev

    (@stoyangeorgiev)

    Hey there @clickingclients ,

    You could also provide the support ticked id.

    Kind regards,
    Stoyan

    Ok thanks – it was Chat ID 7409639

    I have encountered similar redirects in the past week on 3 of my websites when not logged in. I was able to resolve the issue by clearing the purging SG cache. However, my issue is not with URL parameters from Google ads or Facebook. My issue is just any random page on the website can start redirecting to the homepage.

    I am thinking of creating a cron/scheduled task to clear the cache every 8 hours or so. Because it is a super waste of time for me to have to test the website all day long looking for redirect issues.

    • This reply was modified 3 years, 4 months ago by Daniel Chase.
    Thread Starter stinamariechris

    (@stinamariechris)

    @clickingclients My site doesn’t use Cloudflare, so that wasn’t my issue. It had something to do with the tracking URL that was added by Hubspot to my Google Adwords account. I run Facebook ads with no problems and I used my own tracking URLs. Once I removed the Hubspot tracking URL from Google Adwords, the problem was resolved.

    @riseofweb I don’t think you’re having the same issue. Our sites were getting stuck in a redirect loop after one of our tracking URLs were clicked. Maybe there’s a plugin causing your issue?

    I have created a cron job script to clear all cache. Perhaps it could help someone else as well. This script will purge all SG cache (Dynamic cache, Memcached & combined/minified assets) twice a day. Just simply add this to your theme’s functions.php file.

    //SG Optimizer Purge All Cache Twice Daily Schedule
    if ( ! wp_next_scheduled( 'sg_purge_cron_hook' ) ) {
        wp_schedule_event( time(), 'twicedaily', 'sg_purge_cron_hook' );
    }
    add_action( 'sg_purge_cron_hook', 'sg_purge_cron_function' );
    function sg_purge_cron_function() {
    	if (function_exists('sg_cachepress_purge_everything')) {
    		sg_cachepress_purge_everything();
    	}
    }
    //To remove this schedule uncomment this below:
    //wp_clear_scheduled_hook( 'sg_purge_cron_hook' );

    This is nuts and must be fixed with the highest priority. We have the SiteGround Optimizer plugin as well and as soon as we have incoming links using UTM tags (this is THE most standard form of tracking on the internet), suddenly SiteGround Optimizer is doing 301 redirect loops (this totally kills the site) for totally random people who did not even click a UTM-tracked link! One of the redirects is to the UTM-coded URL. This happens in incognito with cleared everything on first time visits.

    Has anyone else had this problem and come up with a permanent fix? I have a redirect coming from a Google Analytics / Facebook Ad and the home page will load with the campaign URL. Some times the page loads but other times it gives the ERR TOO MANY REDIRECTS. My hosting is on Siteground and they haven’t offered any advice on how to fix it. I finally changed the SuperCacher setting (disabled the NGINX DIRECT DELIVERY) based on the feedback from this thread. It is temporarily working but we’ll see if that lasts.
    Thanks!

    Thread Starter stinamariechris

    (@stinamariechris)

    @mpiette My fix was to remove Hubspot’s tracking URLs and I never had the issue again (since March). I use my own tracking URLs instead. I’m still suspicious it has to do with the structure of the tracking URL. What tracking URLs are you using?

    Just here to say that two websites I manage have experienced this over the last few months. It’s been difficult to track down the cause and I’m thankful I found this thread. I’m hoping turning off Dynamic Cache will help resolve this.

Viewing 15 replies - 16 through 30 (of 32 total)
  • The topic ‘301 Redirect’ is closed to new replies.