Best Redirect Practice to Another Domain/page

We are planning to shut down one web site “www.this-old-site.org” because it will be better for people to go straight through to the Hawaii Community Foundation… long story there… but we will continue to purchase, own and maintain “www.this-old-site.org” domain indefinitely.

So what we want is for all GET requests for

http://www.this-old-site.org/* [any page]

to redirect to

http://www.hawaiicommunityfoundation.org/about-us/statewide-offices/kauai-office

Ideally I could do this at the DNS level, but I don’t think you can set a domain to go to a specific page at another domain in a CHNAME A record for “this-old-site.org.” I’m no expert in DNS… but that’s my understanding. If that were possible we could then delete the virtual server “this-old-site.org” completely removing the home directory and all web content and do this at the DNS level. I have a back up here in “hard storage” so we don’t need it on the production server.

If I’m right and this kind of re-direct is not possible via the domain name zone records, we can of course do this by maintaining the virtual host, this-old-site.org, on our box and using .htaccess/mod_redirect to send users to the Hawaii Community Foundation Kauai page site. But I would rather not have to keep this “ghost” web site on disk just for redirect purposes, unless there are no other options. It’s a trivial amt of disk space… so that’s not an issue but if it is never used, why keep it on disk?

Is there a server level option? such that if the DNS still sends GET requests to an IP on our box… it redirects via httpd.conf, even if the virtual host is deleted from VirtualMin? I suppose one hack would be to change the DNS record for this-old-site.org to point to an IP of an existing site, then set the .htaccess on that site to send users coming in with that domain to redirect, but that still seems messy, piggy backing on another site for this purpose…

Any ideas?

DNS indeed cannot do the kind of Apache redirection you require. It only assigns hostnames to IP addresses.

So on DNS level, “oldsite” has to resolve to some IP address where an Apache is running that feels responsible for the hostname. You can do that either with an ServerAlias in your new site, then users will still retain the old URL in their browser address bar. Or you can make an Apache redirect, so their address bar reflects the change.

In any case you need an Apache responsible for the old hostname as long as you wish to keep it around, there’s no way around that.

Locutus: confirmed… I did more research… I probably should have done that first before posting here. Right DNS is domain-IP and IP to domain … no paths.

But happily, Go Daddy (domain host) offers domain forwarding for free… and you can forward to a specific domain/path/page.

So that’s working and we can remove the virtual host and files on disk from the server.

This assumes of course that GoDaddy’s forwarding service will be intact for some time. Which I expect it will, at least as long as humanity has left if runaway kicks in next year. Unexpected: methane is pouring our of the Antarctic. Stay tuned to the Arctic in September. If there is no ice at all, we won’t have to worry about anything like domain forwarding a decade from now, we’ll be busy building our underground bunkers. But… I digress. The cloud we are using probably will still work, even if the temperatures are a bit higher as long as server farms are not built near ocean’s edge we should be OK.