How do you fix broken links after changing your domain?
A while back, I changed the domain of this blog to rebrand. This broke all of the backlinks I had accumulated. I had been marketing my work online, and I didn't want that work to go to waste.
At that point, I was using a smaller hosting service to manage my DNS, but they didn't have the option to redirect the subdomain to a different domain.
I ended up switching to Cloudflare and using their "rules" to route from the old domain to the new one. From blog.tvaisanen.com
to tonitalksdev.com
.
The process was pain-free, and now Cloudflare has become my go-to domain registrar and DNS management tool. Let me show you how simple my configuration ended up being.
Redirect Rule
All it took was to add one redirect rule for the subdomain.
To reroute all the traffic to the new domain.
Conclusion
Cloudflare's free plan includes tools for custom redirect rules and domain DNS management. You can use your current domain registrar and move the DNS management to Cloudflare, but they also provide domain registration services at a cost. I'm not sponsored by them; I just like the service, and I've transferred all my domains to their platform.
Learn how to add your domain to Cloudflare from their documentation.
Once again, thanks for reading.
Feel free to reach out and let me know what you think—social links in the menu.
Subscribe to my newsletter
Read articles from Toni Väisänen directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Toni Väisänen
Toni Väisänen
Software engineer @ Metosin Ltd Need help with a project, contact: first.last@metosin.com As a 𝐜𝐨𝐧𝐬𝐮𝐥𝐭𝐚𝐧𝐭, I help clients find technical solutions to their business problems and facilitate communication between the stakeholders and the technical team. As a 𝐟𝐮𝐥𝐥-𝐬𝐭𝐚𝐜𝐤 𝐝𝐞𝐯𝐞𝐥𝐨𝐩𝐞𝐫, I build technical solutions for client's problems from user interfaces, and backend services to infrastructure-as-code solutions. As a 𝐦𝐚𝐜𝐡𝐢𝐧𝐞 𝐥𝐞𝐚𝐫𝐧𝐢𝐧𝐠 𝐞𝐧𝐠𝐢𝐧𝐞𝐞𝐫, I create, validate and deploy predictive models.