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
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
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 -
301 or 302 Redirects with locale URLs?
Hi Mozers, I have a bit of a tricky question I need some help answering. My agency are building a brand new website for a client of ours which means changing the domain name (yay...). So! I have my 301's all ready to go for the UK locale, however, the issue I have is that the site will also eventually have French, German and Spanish locales - but these won't be ready to go until later this year. We will be launching in just English for September. The current site already has the French and German locales on it as well. Just to make sure I'm being clear, the site will be www.example.com for launch, but by lets say November, we will also have a www.example.com/fr/ and www.example.com/de/ site launched too. So what do I do with the locale URLs? As I said above, the exisitng site already has the French and German locales on it, so I don't particularly want to redirect the /fr/ and /de/ URLs to the English homepage, as I will want to redirect them to the new URLs in November, and redirecting more than once is bad for SEO right? Any ideas? Would 302s maybe be the best suggestion? Thanks! Virginia
Local Website Optimization | | Virginia-Girtz1 -
Best Sources for Advertising Commercial Real Estate?
After spending over $50,000 and 3 years on web site development and SEO I realized that advertising on such commercial real estate sites as Loopnet and Cityfeet were more cost effective for developing leads for identifying businesses seeking commercial space in New York City. My firm is a tenant rep brokerage assisting tenants in the acquisition of office, showroom and commercial lofts space in Manhattan. When my firmswitched to Loopnet I was astounded that this site generated leads at a lower cost and a greater quantity than my private branded website (www.metro-manhattan.com). I would have thought that a private branded site would be more effective. Now 2 years later I am having issued with Loopnet and can no longer advertise there. Does any one have any suggestions concerning business websites where we can advertise commercial tenant representation services in Manhattan? Sites like www.officespace.com look like they have potential. LinkedIn sounds like a good demographic but I am concerned that advertising would only generate requests for links rather than generating bona fide leads. Thoughts??? Thanks, Alan
Local Website Optimization | | Kingalan10 -
Closed Location Pages - 301 to open locations?
I work with several thousand local businesses and have a listing page for each on my site. Recently a large chunk of these locations closed, and a number of these pages rank well for localized keywords. I'm trying to figure out the best course of action.
Local Website Optimization | | Andrew_Mac
What I've done so far is make a note on each of the closed location pages that says something to the effect of "This location is currently closed. Here are some nearby options" and provide links to the location pages of 3 open places nearby. The closed location pages are continuing to rank well, but conversion rates from visitors landing on these pages has dropped. What I'm considering doing is 301ing these pages to the nearest open location page. I'm hoping this will preserve the ranking of the page for keywords for which the nearby location is still relevant, while not hurting user experience by serving up a closed location. I'm also thinking of, as a second step, creating new pages (with slightly altered URLs) for the closed listings. They won't rank as well obviously, but if someone searches for the address or even the street of the closed location, my hope is that I could still capture some of that traffic and hope to convert it through someone clicking through to an open location from there. I spoke with someone about this second step and he thought it sounded spammy. My thinking is, combined with the 301, I'm telling Google that the page it is currently ranking well no longer has the importance it once did and that the page I'm 301ing to does, but that the content on the page I'm creating for the closed location still has enough value to justify the newly created page. I'd really appreciate thoughts from the community on this. Thanks!0 -
Can to many 301 redirects damage my Ecommerce Site - SEO Issue
Hello All, I have an eCommerce website doing online hire. We operate from a large number of locations (100 approx) and my 100 or so categories have individual locations pages against them example - Carpet Cleaners (category) www.mysite/hire-carpetcleaners
Local Website Optimization | | PeteC12
carpet cleaner hire Manchester www.mysite/hire-carpetcleaners/Manchester
carpet cleaner hire london
carpet cleaner hire Liverpool patio heater (category)
patio heater hire Manchester
patio heater hire London
patio heater hire Liverpool And so on..... I have unique content for some of these pages but given that my site had 40,000 odd urls, I do have a large amount of thin/duplicate content and it's financially not possible to get unique
content written for every single page for all my locations and categories. Historically, I used to rank very well for these location pages although this year, things have dropped off and recently , I was hit with the Panda 4.0 update which i understand targets thin content. Therefore what I am int he process of doing is reducing the number of locations I want to rank for and have pages for thus allowing me to achieve both a higher percentage of unique content over duplicate/thin content on the whole site and only concerntrate on a handful of locations which I can realistically get unique content written for. My questions are as follows. By reducing the number of locations, my website will currently 301 redirect these location page i have been dropping back to it's parent category.
e.g carpet cleaner hire Liverpool page - Will redirect back to the parent Carpet cleaner hire Page. Given that I have nearly 100 categories to do , this will mean site will generate thousands of 301 redirects when I reduce down to a handful of locations per category. The alternative Is that I can 404 those pages ?... What do yout think I should do ?.. Will it harm me by having so many 301's . It's essentially the same page with a location name in it redirecting back to the parent. Some of these do have unqiue content but most dont ?. My other question is - On a some of these categories with location pages, I currently rank very well for locally although there is no real traffic for these location based keywords (using keyword planner). Shall I bin them or keep them? Lastly , Once I have reduced the number of location pages , I will still have thin content until , I can get the unique content written for them. Should I remove these pages until that point of leave them as it is? It will take a few months
to get all the site with unique content. Once complete, I should be able to reduce my site down from 40,000 odd pages to say 5,000 pages Any advice would be greatly appreciated thanks
Pete0