Anjanesh

Assignment Statements, Comparisons & Observations
Font: Size: + -
Showing posts with label domain. Show all posts
Showing posts with label domain. Show all posts

To WWW or not to

Monday, July 26, 2010

I've always been fond of naked domains. (FYI, http://mydomain.com is a naked domain, since it doesn't have www in front of it).
Lesser characters to type, see, spell out, hear and read. Much lesser overall energy.
I've always wondered why google.com always redirected to www.google.com and why Google App Engine stopped supporting mapping of an app to a naked URL. May not be the reason as mentioned here, but it does have its advantages.
So I joined the party a bit too late, but I am glad that I was not any later.
One of the advantages of using a subdomain (www is also a subdomain, it just so happens to be the default typing scheme for a website when the World Wide Web was born) is that cookies, if any, are transported to and forth - in the request and response headers - for that subdomain only.
If you have Web Developer, a FireFox addon, you can view all the cookies associated with a URL in the address bar.

Web Developer Toolbar

Here is a one liner php script to demonstrate this :

<?php setcookie("UserID", "23", time() + 3600, "/", "anjanesh.net") ?>

http://www.anjanesh.net/cookie.php

Cookies on www

http://test.anjanesh.net/cookie.jpg

Cookies on test

Lets re-iterate the above, this time without typing in www for the first URL. CTRL + SHIFT + DEL and clear all cookies.

http://anjanesh.net/cookie.php

Cookies on naked domain

http://test.anjanesh.net/cookie.jpg

Cookies on test again

Now, when requesting for a pure jpg image, the cookie information is sent across to the server which is 17 bytes (Cookie: UserID=23) of useless data.
You can use Live HTTP Headers FireFox addon to view real-time browser-request and server-response headers.

http://anjanesh.net/cookie.php

GET /cookie.php HTTP/1.1
Host: anjanesh.net
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8pre) Gecko/20100710 Ubuntu/9.10 (karmic) Namoroka/3.6.8pre
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive

HTTP/1.1 200 OK
Server: nginx
Date: Fri, 25 Jul 2010 01:14:18 GMT
Content-Type: text/html
Transfer-Encoding: chunked
Connection: keep-alive
X-Powered-By: PHP/5.2.11
Set-Cookie: UserID=23; expires=Fri, 25-Jul-2010 02:14:18 GMT; path=/; domain=anjanesh.net
Content-Encoding: gzip
----------------------------------------------------------
http://test.anjanesh.net/cookie.jpg

GET /cookie.jpg HTTP/1.1
Host: test.anjanesh.net
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8pre) Gecko/20100710 Ubuntu/9.10 (karmic) Namoroka/3.6.8pre
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Cookie: UserID=23
HTTP/1.1 200 OK Server: nginx Date: Fri, 25 Jul 2010 01:14:21 GMT Content-Type: image/jpeg Connection: keep-alive Last-Modified: Thu, 29 Nov 2007 03:54:05 GMT Etag: "27284bc-8291-4400943e7f140" Accept-Ranges: bytes Content-Length: 33425 ----------------------------------------------------------

From Y!'s Best Practices for Speeding Up Your Web Site :

If your domain is www.example.org, you can host your static components on static.example.org. However, if you've already set cookies on the top-level domain example.org as opposed to www.example.org, then all the requests to static.example.org will include those cookies.

But its not always possible to safe-guard this if your users don't type the www and you forget to force redirection to http://www
The best solution would be use a completely different domain name as a cookieless domain for static content.

Initially, I did not set the path & domain parameters in setcookie()

<?php setcookie("UserID", "23", time() + 3600) ?>

This does not send cookies across to the subdomain requests even when the cookie was set to the naked URL.
This does not even send cookies across to different paths.
But some browsers, or old browsers may behave differently, automatically adding cookies to *.example.org as Y! pointed out.

Related :

Pi to a Million Places

Friday, June 29, 2007
PI

There are people who'll pay up tons for a nice short non-trade-marked domain name. Most people are under the impression that a very short domain name will fetch better results on a visitor stand-point-of-view.
But these days, this is not necessarily true since there are so many million worth visiting websites that it would impossible to remember the name of the website even if its based on a commonly used word. Thats the reason why social bookmarking sites are on the rise. Plus, with bookmarking features that have improved rapidly like synchronizing between FireFox's and Google's bookmarks, users have only become lazier to use the keyboard even if its a.com. And if they did use the keyboard, they'll do a search for the exact domain name and then click on the exact url link in the SERP - which they already 'unconsciencely' know ! This is very evident from the AOL data leak on August 4th, 2006 - for those of you who know what I'm talking about - others, do a simple search and you'll be enlightened.

Anyway, for those of you who think that a very long wierd looking domain name can never make it (visitor stand-point-of-view), check out this 63 character long domain (3 is the subdomain here)
3.141592653589793238462643383279502884197169399375105820974944592.com !

Now, how many of that it's visitors could've entered it by typing it directly in the browser's address bar ? Either you got to be a Shakuntala Devi or you got be solid at vedic maths.

RegisterFly's Owners Gay Relationship gets Business in the way

Sunday, June 24, 2007

"It's Nothing Personal ... It's Just Business" - That's Donald Trump's The Apprentice's quote that you find on the show.
Its now a total mess for RegistryFly, a fairly medium sized hosting company and a domain registrar having Michael Jackson as one of its ~900,000 customers.

Started as a reseller service, lovers John Naruszewicz and Kevin Medina got their company its own accredited registrar status in 2006. And now, in less than a year's time, they've lost the status in March 2007. There was a bit of a chaos as it was rumored that
Now, the customers' domains are being transferred to GoDaddy.
Theres a blog dedicated to RegisterFly : RegisterFlies

Mails from RegistryFly and DirectI are the only ones I had to set filters to move them to my thrash folder - so far !
Almost 4 yrs ago, I had signed up for DirectI's hosting service and while it was in trial period for 3 days, I decided not to go with them and choose another hosting solution, as hosting in India is still pretty expensive. But in spite of not ordering their service after the trial period, I still get their "Pending Payment" emails !

Similarly with RegisterFly, where I only signed up - that's all I did and and didn't even order a domain and yet their marketing mails used to reach my inbox just too often ! Finally it started being marked as spam automatically.

So kids, what the moral of this new Panchatantra story ? "Never run a business with your gay lover !"

Website.in Domain Name Expiration

Saturday, December 23, 2006
One of my .org domain names expired sometime back. Infact I was waiting for it to expire and buy it again using using Website.in's .org promo which ends on 31st December 2006. The promo gets you to buy .org (also .info) domain names for $2.15 which comes to around Rs 96 - for the entire year ! Thats a pretty good deal for less than a hundred bucks here. Since I had no website associated with it and wasn't really afraid of anyone backordering it since the name is really not worth it except for me. I waited right till the end of pendingDelete period to have it back into the available pool list. To my surprise, I found that Website has renewed the domain name under their behalf while the control is still in my hands. I still have the option of renewing the domain name in my control panel. The expiration is now set to December 2007. For those of you who want to buy a domian name for a low rate (Rs 96 for .org till 31/12/06, Rs 96 for .info, Rs 180 for a .biz and Rs 202 for .us) - this is the best time. 1. Buy the domain. 2. If you can afford hosting, good - if not, set it up at Google Apps for you Domain. 3. If you've not ready to setup any sort of hosting but still want the domain fearing it'll be bought by someone else, buy it now and renew 23 months from the date of purchase. Since you own it for one year, you don't have to worry about it for an entire year. For the next one year, Website will renew it under their behalf but you still got the option of taking it back for another entire year. Please remember though, if you are goning to renew it after Website has renewed it, you are paying for the renewal from the date it originally expired. Lets say you bought a domain on 31st Dec 2006 and it expires on 31st Dec 2007 - Website renews it automatically on 31st Jan 2008 (still under your full control 30-45 after expiration). New expiration is 31st Dec 2008. You decide to renew it for 1 year on 30th Dec 2008 - the expiration would still be 31st Dec 2008 even though you get total control over it just for 1 day. So your best bet would be to renew for 2 yrs. Did you think you could get away renewing every 1.99 years paying for only 1yr ? IMHO, this strategy of Website is really good since backordering your expired domain would take a year to get it. Im not sure how long this strategy will last, but on the safe side, if you really want the domain, just renew for 10yrs in one shot.