Problem with web address without www


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 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.
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 to or vise versa
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!
Shimshey RosenbergSysAdminCommented:
Correct, if you use Network Solutions for your DNS settings, than yes, you should set it up there
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

COCO3515Author Commented:
Thank you!
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 and, DNS is operating correctly.

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

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


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.

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!
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

From novice to tech pro — start learning today.