This one mistake could be costing you website customers & sales and it’s soooo easily checked for and fixed.
In the example I’ll be discussing in a moment, most likely lots (and lots) of good money was paid for a quality website design, support, a full green bar SSL certificate (that’s the best part of £800 a year) and a bunch of Magento extensions to boot, but something so simple is easily overlooked and if the “big boys” can overlook this then the same mistake can be made by us and that’s why I’m sharing this with you.
The Live Example
The best way to show you this is by an example and this morning while looking at the eBay daily deals, I spotted this jacket from Regatta, ever curious to see what they were using for backend software, I opened up one of their images at http://feedback.dare2b.com/altViews/RC_RC/large/MW257_Alt_view_1.jpg and we’re looking ok so far right?
When we strip out the image path keeping the subdomain inplace http://feedback.dare2b.com/ and they’ve done almost the right thing (htaccess or PHP redirect is better) and set a meta redirect on the holding page which then should forward the user onto the main website at http://dare2b.com/ and there, that’s the mistake.
The non www domain dare2b.com is a dead site.
Open a new tab in your web browser and type in both the www and non-www versions of your domain name and check that they both work.
If your website displays when you go to both “www.your-domain.com” AND “your-domain.com” then happy days and if your website redirects itself back to one of the version only, send your boss this email and say “Matt O says I’m cool“, if not read on.
In this specific example when the DNS was setup for the domain name “dare2b.com” a CNAME record was added which points to a subdomain of “amazonaws.com” (the DNS settings are shown here http://who.is/dns/dare2b.com) where the mistake lies in that the catch all /wildcard DNS record for the domain name dare2b.com go to a different server to the one where the eCommerce site is actually hosted and it’s not answering web requests so we get a dead page, which is bad.
DNS Mumbo-Jumbo: If I’ve lost you here with talk of “DNS”, think of DNS being a postcode for the internet which helps your browser find the right address to make a delivery to & from.
When you type in “lastdropofink.co.uk” in your browser, your browser goes off and finds the unfriendly IP address 184.108.40.206 using a human-friendly name lastdropofink.co.uk or “postcode”. I’m sure you’ll agree that “lastdropofink.co.uk” is a lot more easier to remember than “220.127.116.11”.
These “DNS settings” are set by the website domain owner with their domain registrar, companies like Godaddy, One & One or Heart Internet for example.
Keeping it Simple
In the example above for “dare2b.com” this is not a straight forwards fix. The reason being is we know that the domain “feedback.dare2b.com” responds to requests and so does “www.dare2b.com” but “dare2b.com” does not, combine this with their DNS settings and no record for the subdomain “feedback this means that their web server is not configured to answer requests that are sent to “dare2b.com”.
That can get deep really quickly so instead if you website is not responding to both www and non-www requests, the simplest way of handling this is to ask your domain registrar what setting you should enter for your DNS settings so that your website responds to both www and non-www requests and if they can’t help, then ask your web-hosting company.
Tip: If like me you’ve forgotten who you registered the domain with, go to http://who.is/, enter your domain name and look for the “Registrar” entry, this will tell you which site it was registered with and which login details to fig out.
Redirecting WWW to Non-WWW (and Vice-Versa)
I’m not going to cover the ins-and-outs of this here as it’s already been very well documented. The easiest way is with a htaccess file and below are two links that show you how to direct both ways as you desired:
Which version you use doesn’t really matter, what does matter is that the user ends up at the same site for both entries and you don’t have duplicate sites responding on both www and non-www domain names.
Special Note for Magento Users
Magento is quite particular in the domain names it responds to and if your site is using Magento as is the dare2b.com website is in our example, then decide which way you are going to go (www or non-www), ensure that the DNS settings are working (this can take a few [up to 72!] hours to kick in) and then make sure that you set you Magento design settings accordingly.
If you don’t and change the DNS settings or add a htaccess rule that says otherwise your site will get caught in a redirect loop and won’t appear at all.
To remedy this, follow the steps below:
- Go to Admin > System > Configuration > General > Web
- For both the “Base URL”s in the “Unsecure” and “Secure” blocks set the domain name accordingly
- Press “Save”
- Now check the website is responding correctly
Using the dare2b.com example is in the screenshot below:
Even the big boys make mistakes and working around this is relatively straightforward, you just ask your registrar or web hosting company what you should enter, in most cases if you ask, they’ll even change the settings for you too.
I personally prefer the non-www domains, that’s why this site is the non-www version, but if you were to type in “www.lastdropofink.co.uk” in your browser, you end up back here at “lastdropofink.co.uk” and if this was an eCommerce product based site, then I’d not be losing customers and ultimately sales :)
Which version do you prefer? www or non-www? Let me know in the comments box below.