If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

recommended way to change domain names

I am currently hosting my website at home using xampp and a DynDNS account. everything is working great and I have worked hard to get good Google results. Unfortunately, I need to change my domain name of my site. I have read several articles and know there are several ways of doing this, but I am just wondering which one is the recommended way of doing so? One way I figured I can do this is to just point my old and new domain name to the same ip address of my computer I am hosting from (i believe my DynDNS account lets me do so). The other way, which appears to be the better way but not sure, is to use a 301 redirect. If I were to go this route, how exactly do i set it up? I understand that it is basically just putting a line of code in the header of the old site which directs it to the new one. This is fine and all, but brings on the question of, am I technically hosting 2 sites on my computer now?

I would have www.olddomain.com pointing to my ip of my computer with basically a blank index.html with the redirect header redirecting it to www.newdomain.com which would also point to the same ip of my computer. If this is the case, how would I, technically speaking, host those 2 sites from one computer? An additional question is do I just place the redirect code in the index.html or do I place it in every page of the site and redirect it to the same page on the new domain? If the process of using 301 redirect is different from what I am assuming then can someone please elaborate on exactly how to use it in my situation?

You should use a 301 redirect. This will not only accommodate users who have bookmarked your site with your original domain name or who click on links to your original domain name, it will also tell the search engines that your site has moved and they will transfer most of the value of the links that point to your original domain name to the new one. It may take a few weeks for the search engines to absorb all of the changes, so you'll probably see a dip in your rankings and traffic for a while after you do this.

You don't need to bother with your settings in DynaDNS. Just use an .htaccess file on your home server. A search on "htaccess change domain name" should give you the specific .htaccess code required. And once you set up the 301 redirect, use an online server response checker to make sure that your original domain name responds with the correct 301 redirect code and the correct URL for your new domain name.

OK, so I created a .htaccess file and placed it in the root of my site directory. What I entered in the file is as follows from a random tutorial site: (replacing XXX with my old address and YYY with my new one)
<IFModule mod_rewrite.c>
RewriteEngine on
Options +FollowSymlinks
RewriteBase /
RewriteCond %{HTTP_HOST} XXX\.com
RewriteRule ^(.*) http://www.YYY.com/$1 [L,R=301]
</IfModule>

For now my new domain name is purchased, but not set up yet, so I just replaced what the new one should be with google.com for now. Technically speaking, when I enter my old domain in my browser window, I should be redirected to google correct? Unfortunately though when I enter the address in my browser I get a error:

Server error!

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.

Error 500

That is my first problem. My other problem is how to set up my new domain name to point to my existing site on my computer (just like my old one has been)? I would assume that I would have to open another DynDNS account and point my new name to my computer just like i originally did with my old name. Is this the correct missing step that is confusing me?

It seems logical that this is what I need to do and if I am correct it should work as follows: the user enters my old domain name in a browser. It, behind the scenes, directs them to my ip address and reads the .htaccess file which sees that they are looking for my old name and then redirects them to my new name. my new name directs them to the same ip address and reads the .htaccess file again, this time sees that they are looking for my new name and lets them continue to view the site. If a user enters the new name directly it "skips" the .htaccess redirect and lets them continue on to view the site. Am I correct on my assumptions of how this would work?
If this is the case then, what is the point of using the .htaccess file then? These 2 DynDNS accounts would essentially point both old and new names to the same physical site. The users would be reaching the same site regardless of which domain they entered or searched for.