You have thecheesecakefactory.com plus you site lives there. You will know a lot of your site visitors only will type cheesecakefactory.com to their browser, which means you purchase that domain too.
What's the cleanest method of handling the redirection. I understand GoDaddy provides a "domain sending" service but I don't know if this sounds like the "proper" method of handling it, and that i don't always like the thought of GoDaddy handling my DNS.
My other option is delivering the domain to my DNS servers and perhaps my actual server. Can you really do that without establishing a brand new vhost along with a 301 redirect on my small server (using DNS only)? Otherwise, so how exactly does the GoDaddy sending service work?
Update: Solution Below
No chance having a CNAME record only (begin to see the selected answer), it must be achieved around the server level. I wound up applying a catch-all vhost on my small server and pointing the brand new domain to my server having a simple An archive. Here's what I made use of for any vhost:
<VirtualHost *:80> # Catch all DocumentRoot /var/world wide web ServerName cheesecakefactory.com ServerAlias cheesecakefactory.com world wide web.cheesecakefactory.com # Re-direct RewriteEngine On RewriteRule .* http://thecheesecakefactory.com% [R=301] </VirtualHost>
You utilize a CNAME record. The way you set that up varies based on what you are using for DNS.
EDIT: If you wish to make use of the webserver to do this (as with another answer) I'd still recommend against using mod_rewrite. mod_alias is a lot better to setup and employ, and much more clearly expresses your intent. You'd put this inside your .htaccess file:
redirect 301 http://thenameyouwant.com
You can't handle this in DNS alone
The redirection needs to be handled through the HTTP response. So you will have to configure both DNS as well as your webserver.
You are able to setup domain alias's (as with Bill's answer) using CNAMES, but that simply means both web addresses points towards the same server. Both web addresses assists in the same content. For Search engine optimization reasons this really is bad, duplicate content contributes to your sites spammy factor.
The best way to handle this really is to create the CNAME alias to ensure that both web addresses indicate exactly the same server. After you have which use URL spinning to make sure all of the submissions are offered in the same domain consistently.
RewriteCond % !^www.domain.com RewriteRule ^(.*)$ [domain.com...] [R=permanent,L]