Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Analytics: resolve redundant-hostnames warning #1012

Open
chalin opened this issue Jul 22, 2022 · 7 comments
Open

Analytics: resolve redundant-hostnames warning #1012

chalin opened this issue Jul 22, 2022 · 7 comments
Assignees
Labels

Comments

@chalin
Copy link
Collaborator

chalin commented Jul 22, 2022

This is the warning

Property grpc is receiving data from redundant hostnames. Some of the redundant hostnames are:

  • grpc.io
  • www.grpc.io
    Redundant hostnames are counted as separate rows in reports, so hits that are going to the same page on your site from different hostnames will be split into multiple rows. With data split across multiple rows, traffic to specific pages will appear lower than it actually is.

To avoid this problem, consider setting up a 301 redirect from one of your redundant hostnames to the other, or create a search-and-replace filter that strips "www." from hostnames.

Google Tag Assistant Recordings can help you verify that your redirect is setup correctly, or that your filter is working as intended.

For details about filters, see Search-and-replace filters.

@chalin chalin self-assigned this Jul 22, 2022
@chalin
Copy link
Collaborator Author

chalin commented Jul 22, 2022

/cc @ejona86 @thisisnotapril

@chalin
Copy link
Collaborator Author

chalin commented Jul 23, 2022

This might be an old message. I've selected "recheck".

@chalin
Copy link
Collaborator Author

chalin commented Jul 25, 2022

Yep, this is still a problem, which can be confirmed by the fact that the www domain pages are served with status 200 not 301:

$ curl -i https://www.grpc.io 2>/dev/null | head -25 | grep ^H         
HTTP/2 200

Note: drop the grep to see the full response header.

@chalin
Copy link
Collaborator Author

chalin commented Sep 26, 2022

This same problem shows up under GA4, unsurprisingly:

image

@chalin
Copy link
Collaborator Author

chalin commented Sep 27, 2022

Here's what I'm getting now that #1052 has been merged and deployed:

$ curl -i https://www.grpc.io 2>/dev/null | grep '^[lH]'
HTTP/2 301 
location: https://grpc.io/
$ curl -i https://grpc.io 2>/dev/null | grep '^[lH]' 
HTTP/2 200

I've triggered a re-verification in GA:

Notification archived while verifying. Most checks verified within 24 hours, but some may take longer.
image

@chalin
Copy link
Collaborator Author

chalin commented Sep 28, 2022

Nope, that didn't solve the problem. GA still reports redundant hostnames:

Redundant Hostnames

First detected: Jun 28, 2020, 2:19:44 PM
Last detected: Sep 28, 2022, 1:08:36 AM

Property grpc - UA is receiving data from redundant hostnames. Some of the redundant hostnames are:

Redundant hostnames are counted as separate rows in reports, so hits that are going to the same page on your site from different hostnames will be split into multiple rows. With data split across multiple rows, traffic to specific pages will appear lower than it actually is.

To avoid this problem, consider setting up a 301 redirect from one of your redundant hostnames to the other, or create a search-and-replace filter that strips "www." from hostnames.

Google Tag Assistant Recordings can help you verify that your redirect is setup correctly, or that your filter is working as intended.

Learn more: https://support.google.com/analytics/bin/answer.py?answer=1034834&hl=en-US

The Tag Assistant link in that message is to the legacy version. Here are updated links:

@chalin
Copy link
Collaborator Author

chalin commented Sep 28, 2022

I've triggered a re-check again. Maybe I issued the re-check too earlier after the merge yesterday.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant