0

I have a WordPress website and landing pages on HubSpot. The problem is that my landing pages on HubSpot are under a subdomain, and if I use that in Google AdWords the subdomain appears in the ads, and I don't want that. I want the domain name to appear in Google ads, not the subdomain. So what I did is I created 301 redirects from Wordpress to Hubspot and it is working fine, however, I am losing the UTM parameters when the redirect happens.

Can someone suggest a solution for that?

user3006102
  • 23
  • 1
  • 4

1 Answers1

0

Perhaps, this can help you?

RewriteCond %{QUERY_STRING} an-old-url$ 
RewriteRule (.*) /a-new-url/? [R=301,L]

Untested, however, adding this to your htaccess file should carry across the UTM for you.

WPZA
  • 841
  • 1
  • 10
  • 27
  • I don't think that would work. Here is what I am looking for: Original URL: example.com/whatever/?utm_source=adwords&utm_campaign=ecom&utm_medium=cpc I want it to go to: subdomain.example.com/blablah/?utm_source=adwords&utm_campaign=ecom&utm_medium=cpc – user3006102 Jan 21 '19 at 00:27