Over a million developers have joined DZone.

Should Your Domain Include WWW?

Why did you get a slow load time with apple.com, but www.apple.com loaded quickly? Find out why, and find out if you should be including WWW in your domain.

· Performance Zone

Discover 50 of the latest mobile performance statistics with the Ultimate Guide to Digital Experience Monitoring, brought to you in partnership with Catchpoint.

We operate in an industry where most of the people who work in development, engineering, IT Operations, etc. optimize their sites to death, trying to squeeze every millisecond out of their load times. Yet sometimes, techniques that are staring us right in the face go unnoticed.

Recently, as I was trying to buy a new shiny gadget, I just typed apple.com in my browser bar and was met with an extremely slow load time. I told myself my cable modem must be acting up, so I rebooted. But that did not change anything.

Then I typed www.apple.com and then I got the speed I expected.

To find out why, let’s see what IP address apple.com points us to using the DIG tool:

DIG apple.com

Now let’s look at the DIG for www.apple.com:

DIG apple.com

As you can see, the www domain is configured to point to Akamai, whereas the non-www one is pointed to Apple’s internal servers. When you set up your domain, you have to give the root (i.e. catchpoint.com) to an A Record.

What’s the impact when this isn’t done? In the case of Apple, it’s huge – about six times slower.

apple.com www vs non-www

But Apple is hardly alone here. We surveyed 1,000 of the top internet domains. Out of those 1,000, a little over half (513, to be precise) had both the www and non-www domains point to the same IP address. That means that 487 domains configured them differently, thus potentially giving a different user experience.

The main reason for this difference is the complexity involved with setting up such a configuration so that it works with your DNS, Web Servers, and CDNs. Sadly, it hasn’t gotten any easier in recent years, and so most companies resolve the issue through a 301 or 302 redirect. However, not only is this method slower, but it also adds risk because people forget to monitor the redirects.

This issue becomes even more relevant due to the increase of mobile usage. No one types www. into the browser on their phone – a behavior that has extended to desktop browsing as well – but the ultimate price is a slower user experience. Additionally, mobile browsers and even Microsoft Edge automatically hides www., thus reinforcing on the user the idea of “domain.com” without the prefix:

apple.com microsoft edge

As we’ve said before, performance is about more than just speed – it’s also about reliability and consistency. Given that many companies don’t bother to include the www. prefix when listing or advertising their site, most users don’t even know that including it or not including it could have any effect on their experience.

Is your APM strategy broken? This ebook explores the latest in Gartner research to help you learn how to close the end-user experience gap in APM, brought to you in partnership with Catchpoint.

Topics:
performance ,ip address

Published at DZone with permission of Mehdi Daoudi, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}