Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I want my website to work either way for both www.mysite.com and mysite.com, so I setup an A record for the root domain mysite.com and then created a CNAME record which points www.mysite.com to the host record mysite.com.

Now if I type www.mysite.com, it's actually resulting in a 301 redirect to mysite.com. But every time the redirection is causing about 3 seconds latency (see screenshot).

screenshot of 301 redirect latency

Have I made any mistake in configuring my domain?

share|improve this question

1 Answer 1

I'm doing that also in my site, and that time is not the redirect time - a redirection (as it is called) takes almost no time.

That line represents the time between the HTTP call and the server response, which involves the DNS resolution process, the server handling the call, and receiving the HTTP response.

You can see it in more detail in this picture:

enter image description here

(Waiting refers to all the time the server spends performing operations until it responds)

Most browsers also cache 301 calls, which makes this process almost immediate.

share|improve this answer
    
+1 That was also my take on this too. –  dan Sep 26 '13 at 11:05
    
Thanks mate, but the confusion is, if I use mysite.com directly, it only takes 685ms wait time, with www.mysite.com redirection 1.07s wait time!! I manage DNS with CloudFlare, is it due to the CDN or my web host server is not optimized. 3s to render a page is huge in case of UX, in compare to 700ms if visitor use root domain mysite.com –  Arijit Dutta Sep 26 '13 at 11:45
    
For what you're telling me, if you have configured a CNAME redirect in CloudFare, contact them because it'll have to do with them –  I.G. Pascual Sep 26 '13 at 12:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.