Capturing HTTP referrer in GA when a 301 is stripping the source parameters
-
Good day,
To make a long story into a short one - have you ever had any experience or encounter where you've needed GA to capture the HTTP referrer of your traffic before a 301 redirect script triggers (and thus strips the original source of traffic)?
I am working with a multitude of sites where the TLD redirects to a language directory, and because many of the referring sites and sources of traffic come into the TLD and then hit a 301, the referring source is then lost and most of this then shows as Direct traffic to the language directory (the effective 'home page').in GA.
Would sincerely appreciate any inputs you might have about how to effectively capture these sources as a workaround. I'm probably in need of a smart analytical fix, a clever tagging method or some development amendment that is unfamiliar to me. For the sake of this discussion, building the TLD up to an existing page is not a viable or feasible fix in this instance.
Thank you!
-
Hi!
Are you using clientside or serverside redirects? Since you talk about 301, I assume you use serverside redirects. I think if the rewrite rule is setup correct, then it should preserve the referrer info. But if this is added as e.g. utm_source parameters to the URL, then perhaps you can experiment with the flags set for the redirect rule?
Assuming you are working with an Apache server: Looking at https://httpd.apache.org/docs/current/rewrite/flags.html#flag_qsa, it looks as if parameters can be kept/appended to the target URL. Else, the setting [L,R=301] should probably work OK with regards to keeping the referrer.
Hope this helps
Best regards,
Anders
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
I have followed all the steps in google speed ranking on how to increase my website http://briefwatch.com/ speed but no good result
My website http://briefwatch.com/ has a very low-speed score on google page speed and I followed all the steps given to me still my website speed doesn't increase
Local Website Optimization | | Briefwatch0 -
Do old backlinks still help with new URL with 301 redirect? Also I added the www. How does this affect it all?
I changed my URL from exampledetailing. com to exampleautodetailing. com. It is redirected with a 301. Also, it is on Squarespace AND I opted to add the www. So will the old backlinks of exampledetailing. com still help the new URL exampleautodetailing. com or do I need to try and update all the links? Also, future links, do I need to include the www. or just the root domain of exampleautodetailing. com or even the whole https://wwwexampleautodetailing. com? I believe the www is considered a sub domain and a new entity on Google, so I am not sure how that works. Thank you!
Local Website Optimization | | Rmarkjr810 -
Different variations of my site (www ; non www ; https ; http) have different authority status
In Open Site Explorer I can see that the www and non www versions of my site gets treated differently with one group of links pointing to each version of the same page. This gives a different PA score. eg. http://mydomain.com DA 38 PA 37 http://www.mydomain.com DA 28 PA 27. Currently our preferred variation is https://www.mydomain.com but it used o be http://mydomain.com for 3+ years and I can see that the non www version of my domain have more authority. Would you advise us to "change back" to setting our preferred url as the non www version as before or would it have a negative impact on our SERP ranking etc if we change it again now?
Local Website Optimization | | shaunn140 -
Google still indexing home page even after with 301 - Ecommerce Website
Hi all,
Local Website Optimization | | David1986
We have a 301 redirect problem. Google seems to continue indexing a 301 redirect to our old home page. Even after months. We have a multiple language domain, with subfolders: www.example.com (ex page, now with a redirect to the right locale in the right country) www.example.com/it/home (canonical) www.example.com/en/home (canonical) www.example.com/es/home (canonical) www.example.com/fr/home (canonical) www.example.com/de/home (canonical) We still see the old page (www.example.com) in Google results, with old metadata in English and, just in some countries (i.e.: France), we see the correct result, the "new" homepage, www.example.com/fr/home in first position.
The real problem is that Google is still indexing and showing www.example.com as the "real" and "trusted" URL, even if we set: a 301 redirect the right language for every locale in Google Search Console a canonical tag to the locale url an hreflang tag inside the code a specific sitemap with hreflang tag specified for the new homepages Now our redirect process is the following (Italy example).
www.example.com -->301
www.example.com/en/home --> default version --->301
www.example.com/it/home --> 200 Every online tool, from Moz to Bot simulators see that there is a 301. So Correct. Google Search Console says that: on www.example.com there is a 301 (correct) in the internal link section of Google Search Console the www.example.com is still in first position with 34k links. Many of these links are cominig from property subdomains. Should we change those links inside those third level domain? From www.example.com to www.example.com/LOCALE/home? the www.example.com/LOCALE/home are the real home page, they give 200 code Do you know if there's a way to delete the old home page from Google results since this is 301? Do you think that, even after a 301 redirect, if Google sees too many internal links decides to ignore the 301? Thanks for your help! Davide0 -
New Domain Link Building Order - When to 301 Redirect?
Hello Everyone - I am trying to lock down the best Local SEO and link acquisition order for 1 1/2 month old Domain. The Domain is clean - No History - Registered in WMT's on January 20th It's a service franchise website consolidating about 5 independent locations into a single branded site. The each location now has it's own location page on the new site: www.examplesite.com/Location-1 I'm considering the best timing to add 301's to the current Locations individual websites, to the locations pages on the new site.Some of which are currently ranked well (position 2) for one of their primary commercial terms. www.individuallocationsite.com ---> www.examplesite.com/Location-1 I don't want to lose that ranking, but will need to do the 301 redirect at some point. Should I - A.) Complete all of the Citation Work, Natural Profiles, Blog Posts...etc FIRST and let the new website age before 301'ing the locations? Giving it the best chance to have no interruption in those rankings? B:) 301 All the properties into the new website first and start all of the other Local SEO work second? C:) Something else? Thanks in Advance
Local Website Optimization | | CRO_first0 -
What is the best way for a UK company to source SEO Support to boost SERPS in USA Google?
We are a niche web retailer with a world leading product and as such are probably the best option for USA customers (even though we are based in the UK) up to 18 months ago google agreed and placed us high for USA searches and we had good business as a result however since penguin (or around that time anyways) google increased our SERPS for more local markets (UK and EUROPE) and decreased our ranks for USA with a consequent reduction in our USA sales We want to improve rank again in USA (and Canada and Australia and Russia) but need specialist help What's the best way to source that? (short of someone saying they know exactly how to do that) ant recommendation most gratefully received Tom
Local Website Optimization | | tomnivore0 -
Best practices for 301 redirect to a new location website.
We just opened a new location in a nearby city. We were already servicing this location from our main base. As such we had a special page for this location which raked fairly well. The new location will have its own website. Would it be better to 301 redirect the current location page to the new location website? Or should we simply link from the old page to the new location's website? Any best practices?
Local Website Optimization | | Vspeed0 -
Multi Location business - Should I 301 redirect duplicate location pages or alternatively No Follow tag them ?
Hello All, I have a eCommerce site and we operate out of mulitple locations. We currently have individual location pages for these locations against each of our many categories. However on the flip slide , this create alot of duplicate content. All of our location pages whether unique or duplicated have a unique title Tag, H1, H2 tag , NAP and they all bring in the City Name . The content on the duplicated content also brings in the City name as well. We have been going through our categories and writing unique content for our most popular locations to help rank on local search. Currently I've been setting up 301 redirects for the locations in the categories with the duplicated content pointing back to the category page. I am wondering whether the increase in number of 301's will do more harm than having many duplicate location pages ?.. I am sure my site is affected by the panda algorithm penalty(on the duplicated content issues) as a couple of years ago , this didn't matter and we ranked top 3 for pretty much for every location but now we are ranking between 8 - 20th depending on keyword. An Alternative I thought, may be to instead of 301 those locations pages with duplicate content, is to put No Follow tags on them instead ?... What do you think ?. It's not economically viable to write unique content for every location on every category and these would not only take years but would cost us far to much money. Our Site is currently approx 10,000 pages Any thoughts on this greatly appreciated ? thanks Pete
Local Website Optimization | | PeteC120