Problem with web address without www

Greetings!

If someone enters our web address in their browser without the www, it would show page could not be found.
But, if they enter www in front of our web address, it would bring them to our website. We never paid attention to this until we received a warning from Google Analytics recently as shown below. I guess Google is recommending us to setup our website in a way where it would open if someone doesn't enter www. infront of our web address.  Is there a way to configure our website as suggested by Google?  Thank you!

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Property http://www.xyz.com is receiving data from redundant hostnames. Some of the redundant hostnames are:
•      xyz.com
•      www.xyz.com
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.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
COCO3515Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Shimshey RosenbergSysAdminCommented:
Google gives you a good suggestion.. Just set a permanent redirect (301) on your DNS server to send traffic coming to www.xyz.com to xyz.com or vise versa
0
COCO3515Author Commented:
Thank you for your quick response.  I'm not too familiar with DNS settings but after some research it appears that the 301 redirect is supposed to be setup in Network Solution's DNS settings for our company. Is that correct? Thanks!
0
Shimshey RosenbergSysAdminCommented:
Correct, if you use Network Solutions for your DNS settings, than yes, you should set it up there
0
What were the top attacks of Q1 2018?

The Threat Lab team analyzes data from WatchGuard’s Firebox Feed, internal and partner threat intelligence, and a research honeynet, to provide insightful analysis about the top threats on the Internet. Check out our Q1 2018 report for smart, practical security advice today!

COCO3515Author Commented:
Thank you!
0
Dr. KlahnPrincipal Software EngineerCommented:
Just set a permanent redirect (301) on your DNS server

With respect to the previous commenter, there is no such thing.  The 301 redirect is a web server status code.

DNS is not involved with this problem.  Since the HTTP request is getting to the target web server for both xyz.com and www.xyz.com, DNS is operating correctly.

What needs to happen is that the web server should be configured to respond to both FQDNs, xyz.com and www.xyz.com.

In Apache, this is done with the ServerName and ServerAlias directives:

ServerName www.xyz.com
ServerAlias xyz.com

Open in new window


In IIS there's a way to do it as well, but as I don't use IIS I don't know what it is.  If you use IIS let us know and one of the IIS experts can tell how it's done.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
COCO3515Author Commented:
You are correct.  The problem was found to be on the webserver and not the dns server. Thanks!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Google

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.