Changed my website hostname to me

Some of you may have recognized this blog under https://sysctr.nl. I wanted to change the blog url to something not tight to a product or a brand. So I decided to reserve my own name as a domain name. So I can blog on every topic, on every brand and about every product that pops up to write about. The sysctr blog was really for system center products and blog posts around data center management. This will remain but as I also blog on hyper-v.nu and azurestack.eu I want this to be my more generic blog. I don’t want to forget to mention that this blog is running on WordPress.

My goal was also to keep the SEO for my blog posts. Some of them are high rated and it would be sad if those would be gone. In this post I will give you quick inside on how I changed the hostname of my website.

First I claimed the new name off course, I bought markscholman.com. As I run my own webserver on IIS I added markscholman.com and www.markscholman.com as binding on port 80 on the same site sysctr.nl was running on.

I configured my office 365 mail account to allow the cert vendor to validate my domain. Then I requested, validated and installed a certificate on my webserver. So after the certificate was installed on the webserver I added a new binding for markscholman.com on port 443.

I already had a IIS rewrite rule to always redirect traffic from http to https:

I needed to make sure that beside the http request that are redirected also the https://sysctr.nl/* needs to be redirected to the new hostname https://markscholman.com/*

So I edited the existing http to https rule to redirect not to the HTTP_HOSTNAME (incoming hostname) but hardcoded it to https://markscholman.com/{R:1}. So the redirect for http to https will work. But then I had left my google results that were all pointing to https://sysctr.nl/something/something. The next input rule I added was that if the incoming url matches sysctr.nl it also has to be redirected to https://markscholman.com/{R:1}

So now google results amd new direct hits on the root of sysctr.nl or www.sysctr.nl are now all redirected to my new hostname:

After that I looked at the source code on one of my blog post and found out the pictures are hardcoded by the blogging tools I am using to the old url. So I need to replace those as well. For that I found a MySQL script that handled it for me. BACKUP YOUR DB FIRST. Then I logged in phpMyAdmin and selected my database. I ran the following query to change all the urls:

And that’s it. Now my migration is finished and everything is running on my new domain. I hope it might help you if you need to migrate your WordPress site to a new domain.