In November 2010, I started the Flashlight Wiki after getting frustrated editing someone else’s wiki and being unable to stop spam attacks there. At the time, I purchased the domain flashlight-wiki.com as an alternative to flashlightwiki.com which was already taken but not used. Then, in November of last year, flashlightwiki.com was abandoned and I was able to purchase it.
I think generally it is better to have a domain without a hyphen in it because people might not remember to put the hyphen in when linking to the site or typing it in to their browser. So I knew that eventually I wanted to move the wiki, but I didn’t want to deal with it yet and was afraid that moving it might cause the site to lose page rank, which gives the site priority when people do searches on Google. I have been getting about 300 visitors a day, so I didn’t want to lose that, even though the site doesn’t generate any real revenue, with the small AdSense ad only generating a few dollars a month.
So rather than do anything with the new domain, I entered some settings at the registrar, GoDaddy, to just point the domain to flashlight-wiki.com. That way if someone left the hyphen out, they would be redirected to the site anyway. Even if they plugged in an address with a page name, like http://flashlightwiki.com/Lenses, they would be redirected to that page. So that was pretty neat.
After doing a lot of work recently on moving the blog, updating the wiki, and making improvements, I felt like I was ready to tackle moving the site to the new domain.
If I was going to have the domain point to my web host, I had to let the nameservers at my host, A Small Orange, know about it. I thought only the tech support people could do that, but I read through some of the online help there and it seemed like I could do it by managing add-on domains in the web host control panel. So I pointed the domain to the folder, flashlightwiki.
Next, I copied all of the files in my wiki installation that were in a folder called flashlight-wiki. I tried to visit the site at that location, but I think the htaccess was redirecting me. I edited the localsettings file to change references to flashlightwiki. And I changed the htaccess file in that folder to redirect to flashlightwiki. I’d still get redirected though. I think the htaccess file on the root folder was messing me up, but I edited that too and still was getting redirected.
So then I went to GoDaddy and turned off the forwarding setting I had there and pointed to A Small Orange’s name servers. A message said that it would take 2 to 48 hours for this change to take effect on the internet. So that seemed like a good time to take a nap.
Later on I tried entering http://flashlightwiki.com and was still getting redirected. So I tried doing the same thing in Internet Explorer. Worked like a charm. I guess Firefox caches redirects somehow and so it was redirecting me even though the rule wasn’t in place anymore.
So now a neat thing had happened. I had two versions of the wiki both using the same database. I didn’t try making changes, but I don’t see why making a change in one wouldn’t reflect the same change in the other.
Now I started changing links I had to the old wiki to the new one. Since I have a lot of links on the blog, it would be nice if I could do a global find and replace, but I couldn’t see a way to do this in the WordPress dashboard. But in looking for help I did find an extension that allows you to do this. So I installed that and did the find and replace, which did not work. It turns out I had only done a find and not a replace. So I did it again and everything was fixed. Really too fixed because sometimes I was talking specifically about the hyphenated domain, so I did go back and clean up a little to put some hyphens back.
I wasn’t sure I wanted to do a redirect from the old site to the new site yet. If people’s browsers had cached the redirect they could get caught in a loop. When I did redirects from the blog on mac.fiveforks.com to fiveforks.com, I wound up creating a long list of commands in the htaccess file for each post, but with the wiki I didn’t want to just redirect part of the site, but everything on the site, which is a lot easier. I could do this with htaccess, but it seemed to make more sense to do this through GoDaddy by forwarding the old domain to the new domain. This would also forward all the individual pages. But again, it would take a couple of hours to propagate. So I walked the dogs and then took a nap.
Anyway, it has been a couple of hours and the forwarding is working now. At some point I can delete the old wiki installation and free up some space on my server. I might give it a week. And in the next few days to weeks hopefully Google and the other search engines will pick up on the redirect and forward people to the new site automatically. With the blog, Google picked up a couple of pages quickly, but others took a few weeks.
- ASO’s cPanel: Set up add-on domain (which creates a folder)
- Copy (not move) Mediawiki installation to new folder in cPanel File Manager
- Customize htaccess and localsettings.php for new folder/domain
- GoDaddy: enter ASO’s nameservers for new domain instead of forwarding
- Wait a couple of hours while new domain setting propagates
- GoDaddy: set old domain to forward to new domain