but when someone clicks a google link to our site they still see X-Y.com in their address bar the whole time they are on our site
If this is happening, then your 301 permanent redirect is not working - with a functioning 301 all page requests would be redirected to the new domain name and will be visible in the browser's address bar.
Your situation sounds more like a frame redirect of no redirect at all - you should check with a live HTTP headers tool. Fix your 301 and the problem will resolve itself over time.
HTTP/1.1 200 OK
Date: Wed, 07 Jun 2006 16:00:00 GMT
Server: Apache/1.3.34 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_ssl/2.8.25 O
penSSL/0.9.7a PHP-CGI/0.1b
Last-Modified: Tue, 23 May 2006 14:34:51 GMT
ETag: "be02c5-bd6d-44731d8b"
Accept-Ranges: bytes
Content-Length: 48493
Connection: close
Content-Type: text/html
I dont see anything about being redirected, shoudl it have that here?
[edited by: jatar_k at 4:17 pm (utc) on June 7, 2006]
[edit reason] examplified [/edit]
We want to the account currently under x-y.com to be associated with the new domain name y.com instead and we want to have have the url x-y.com 301 redirect to y.com.
So that if people click a link on Google that points to x-y.com it will redirect them to the new web site y.com instead. Can you tell me how, or make the changes for me, thanks!
*******
Now I am not sure WHAT they did! They told me today my old domain belongs to them now and I had to buy it back, which I did and that pisses me off, but they did give me my new domain for free (kind of a trade) so i geuss i am even, so I am not so mad, and they did sell the old domain back to me with no issue which is also good.
So now I have a hosting account under the new domain. With the old domain I only own the domain name, but have no hosting account. BUT my web site still comes up for both domains!? I dont quite know what to ask or tell my hosting company to get this straight for me! It is VERY important that the old domain no longer be active and instead takes people to the new domain name - so our old parent company can see we are no longer actively using that old domain name with their company name in it.
Is this tht confusing> My hosting co has been in business MANY years, and I have been a customer since they began and own a handful of hosting accounts with them and they are always very helpful in support but this issue is ticking me off. And I do not know much about how domains redirect and are 'parked' so i dont know how to make this work....when you make a change like this do you have to keep a hosting account under the old domain name so you can redirect? I hope i dont have have that added expense but I will if I have to.
You need to find out (or ask your hosting company) what platform the server is running, specifically if the server is running the Apache webserver software and whether mod_rewrite is available.
If you have mod_rewrite, then you can create a file called .htaccess in your document root and add the following lines:
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^(www\.)?old-domain\.com
RewriteRule (.*) http://www.new-domain.com/$1 [R=301,L] This will redirect both the www and non-www versions to your new domain.
<added> I see you have just posted that you have mod_rewrite, so the above can be used or added to your existing .htaccess file </added>