Using Custom Domains for your medium.com blog

Yasser Shaikh
Dec 27, 2018 · 2 min read
Photo by rawpixel on Unsplash

I have been running my WordPress blog — www.yassershaikh.com for over 7–8 years now. In the last couple of years I am not as much active on it as I would like myself to be. But it still requires me to pay for the hosting, remember to renew it every year, and whenever I login to manage this instance, WordPress is shouting on my face to install 100 updates & update 50 plugins!

So I thought it would be a good time to get rid of WordPress blog, export all my posts to medium.com, (which was very easy until very recently where they announced they will not be supporting it anymore. Lucky for me, I had done this step long back.) I still wanted my domain www.yassershaikh.com to work and redirect to my blog on medium.com, (which again medium.com supported out of the box, but they stopped doing that too.) This post is about doing that redirection and getting rid of anything & everything related to WordPress.

1. Redirection

Setting up redirection to your medium.com blog is an easy process using cPanel’s “Add Redirect” feature.

2. Uninstall WordPress

This is an optional step, I wanted to make sure nothing of WordPress was in use. Easiest way is to FTP to your site’s public_html folder and delete everything except index.php (Will get back to that file in the last step). I would also recommend to delete MySql instances that your WordPress installation was using, I did.

3. Final Tweaks

This can again be an optional step. For me, even after setting up the redirect, some pages were not redirecting. As a workaround and not spend more time on this I redirected using the index.php (the same file we did not delete in the previous step).

<?php
header(“Location: https://medium.com/yasser-shaikh/we-have-moved-8969c1416793");
die();

Positives

  • No more paying for the Hosting.
  • No need to worry about Bandwidth/Disk usage.
  • No need to worry about Backup/Upgrades etc

Negatives

  • All old links will not work (though they are still redirected to a page on the new blog)
  • Limited UI customization available on Medium.com

Yasser Shaikh's blog

It's supposed to be automatic, but actually you have to push this button.

Yasser Shaikh

Written by

Yasser Shaikh's blog

It's supposed to be automatic, but actually you have to push this button.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade