Why http to https redirects strip Google Ads tracking

Paid conversions showing as Direct traffic? When your server redirects from http to https, it often strips the Google Ads gclid parameter. Here is the fix.

Your Google Ads report shows four hundred paid clicks on your new campaign, but your CRM only attributes twelve leads to paid search. The rest are sitting in a generic Direct traffic bucket, completely disconnected from the money you spent to acquire them.

This happens when a tracking parameter fails to survive the journey from the search results to your final landing page. When someone clicks a Google Ad, the platform appends a unique identifier called a gclid (Google Click ID) to the end of your web address. If your server forces a redirect along the way, that identifier is often left behind.

We check the exact server response headers your website provides when a visitor clicks an ad. A legacy configuration will drop the query string during a redirect, turning a paid click into an anonymous visitor. This breaks your conversion tracking, ruins your return on ad spend calculations, and leaves your bidding algorithm guessing.

The mechanical fault in your server configuration

When a visitor requests an old http address or a non-www version of your domain, your server correctly points them to the secure, primary address. The fault lies in how that redirect is built.

If the server configuration tells the browser to go to the new address without explicitly telling it to carry the query string along, the parameters are wiped. The browser requests the secure page, but the gclid is gone. Analytics platforms see a visitor arriving without a known source, so they file the session under Direct.

We see this frequently when a business upgrades their hosting or applies a new SSL certificate without auditing the underlying server rules. The website loads perfectly, but the marketing attribution is quietly severed. Fixing this requires a surgical edit to your Apache or Nginx configuration files to ensure the query string survives the jump.

For businesses spending heavily on search, capturing these lost identifiers is the first step in our lead and enquiry tracking work. We trace the click from the ad network through your infrastructure to ensure the parameter actually reaches your analytics scripts.

Why Smart Bidding fails without the click ID

Google Ads relies on the gclid to connect an offline outcome to the specific auction where the click was purchased. When a prospect completes a form, your tracking script captures this identifier and passes it into a hidden field. Your sales team works the lead, wins the contract, and you upload that closed deal back into the ad platform.

If the redirect strips the parameter before the page loads, the tracking script has nothing to capture. The hidden field stays empty. When that lead becomes a £50,000 contract, you have no way to tell Google Ads which keyword drove the sale. The algorithm assumes the campaign failed to produce any meaningful business and stops bidding on those high-intent terms.

This disconnect forces your paid search agency to optimise purely on shallow metrics like form submissions or time on site, rather than actual revenue. You end up paying top-tier acquisition costs for traffic that looks busy but never actually buys.

The impact on offline conversion tracking

The most severe consequence of a stripped click identifier is the complete failure of offline conversion tracking. When you integrate your customer relationship management system with your advertising platform, the goal is to feed qualified revenue data back into the bidding algorithm.

This process requires a match key. When a prospect submits a form, the gclid is captured and stored alongside their contact details in your database. Months later, when that prospect signs a contract, your system sends a message back to Google Ads saying that specific click resulted in a sale.

If the server redirect stripped the gclid before the form was even loaded, your database has no match key to store. When the deal closes, your system cannot tell the advertising platform which click was responsible. The revenue is recorded in your accounts, but your marketing reports show a zero return on investment. The algorithm, starved of positive signals, shifts your budget away from the keywords that actually drive your business. This is why we insist on verifying the server headers before we build any CRM integrations.

The difference between cross-domain linking and server redirects

It is important to distinguish a server-level redirect from a cross-domain tracking failure. When a visitor moves from your main website to a separate booking portal or a third-party checkout, the analytics platform uses a different mechanism to maintain the session.

If that mechanism fails, you will often see payment gateways taking credit for your sales. We have documented why PayPal and bank redirects show up as your top revenue source in separate audits.

However, a server redirect happens before the website even finishes loading. The browser asks for the old web address, and the server immediately replies with the new one. The Google Analytics and Google Ads tags have not even fired yet. They never see the original request. They only see the visitor arriving at the final secure address, completely stripped of their paid search history. This is why fixing the tracking tags will not solve the problem. The fix has to happen at the infrastructure level.

Illustrative scenario: The cost of stripped parameters

If your campaigns rely on accurate conversion feedback to optimise bids, losing the gclid means your budget is being spent blind. The following calculation shows the commercial impact on a B2B campaign when a redirect strips the tracking from half of your paid traffic.

Scenario inputValueCalculation step
Total campaign spend£10,000Baseline cost for the quarter
Total paid clicks delivered500 clicks£10,000 / 500 = £20 per click
Actual leads generated50 leads£10,000 / 50 = £200 true cost per lead
Leads surviving the redirect25 leadsOnly 50 percent of traffic retained the gclid
Reported cost per lead£400£10,000 / 25 recorded leads
Lost attribution gap25 leads£5,000 of spend appears wasted

When your reported cost per lead doubles artificially, your agency will likely pause the campaign or reduce the bids. You lose market share simply because a server rule dropped a text string. Correcting the redirect restores the data loop.

Diagnostic breakdown: Server redirect types

We audit the HTTP headers your server returns to identify exactly where the tracking parameter is lost. The syntax depends on whether your infrastructure relies on Apache or Nginx.

Server environmentWhat the configuration rule saysWhat happens to the tracking
Apache (Faulty)Redirect permanent / https://example.com/Drops the query string on older setups if not explicitly configured with query string appending.
Apache (Correct)RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]The %{REQUEST_URI} variable carries the gclid safely to the final secure address.
Nginx (Faulty)rewrite ^/(.*)$ https://$host/$1 permanent;The rewrite discards the original arguments, stripping the tracking ID completely.
Nginx (Correct)return 301 https://$host$request_uri;The $request_uri captures both the path and the parameters, preserving the attribution.

Fixing these rules requires access to your server configuration files or your hosting control panel. We provide the exact replacement syntax to your development team and verify the headers once the change is live.

How we verify the repair

We do not wait for Google Ads to report a discrepancy. We use command line tools to request the exact URL used in your advertisements, including a test parameter. We inspect the response headers to confirm that the location directive in the permanent redirect contains the full query string.

Once the server rule is corrected, we monitor your analytics to confirm that the Direct traffic volume drops and the Paid Search volume rises proportionately. We also review your Google Tag Manager setup to ensure the tags are firing correctly now that the parameter is surviving the journey. If you recently changed your primary domain, we often check for website migration conversion tracking issues that might also be suppressing your data.

Every link in the chain must hold. A missing parameter is a structural fault, and repairing it is a core part of our lead and enquiry tracking service. We ensure your marketing investment is measured on reality.

Frequently asked questions

Will fixing the redirect recover my lost historical data?

No. Once a visitor session is recorded as Direct, the analytics platform cannot retroactively assign it to a paid click. The gclid was never captured by the tracking script at the time of the visit. Fixing the server rule only protects your future attribution and budget optimisation.

Can I fix this by changing my Google Ads destination URLs?

Updating your ads to point directly to the secure address is a good practice and will bypass the redirect. However, it does not solve the problem for visitors who type your old address, click an outdated email link, or follow a non-www bookmark. Correcting the server rule provides a robust safety net for all traffic sources.

Does this issue affect organic search traffic as well?

Organic search does not rely on a click identifier in the URL to determine the source. The browser passes a referrer header that analytics platforms use to identify organic traffic. The stripping of query parameters primarily destroys the attribution for paid campaigns, email marketing, and custom affiliate links that require specific tracking tags.