# How do I change the legacy CDN URLs of images in posts?

**URL:** <https://meta.discourse.org/t/how-do-i-change-the-legacy-cdn-urls-of-images-in-posts/97518>\
**Category:** Product Support\
**Created:** [19 בספטמבר,‏ 2018,‏ 4:09am UTC](https://meta.discourse.org/t/how-do-i-change-the-legacy-cdn-urls-of-images-in-posts/97518 "2018-09-19T04:09:39Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![snakeninny](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/snakeninny/32/115522_2.png) [@snakeninny](https://meta.discourse.org/u/snakeninny)\
**Post date:** [19 בספטמבר,‏ 2018,‏ 4:09am UTC](https://meta.discourse.org/t/how-do-i-change-the-legacy-cdn-urls-of-images-in-posts/97518/1 "2018-09-19T04:09:39Z")

</div>

Hi Discourse team,

Forgive me if there’re duplicate topics but I don’t even know what keywords to search, so I started a new topic describing my problem.

Recently I got update from my CDN provider that they will abandon the legacy URLs like `http://7xibfi.com1.z0.glb.clouddn.com/`, and suggested me to change the URLs to my custom one `http://cdn.iosre.com/` ASAP.

The problem is that most of the old posts on my [website](http://iosre.com), e.g. this [one](http://iosre.com/t/hopper-mac/1428), contains images with the legacy URLs, and they will be not accessible after the CDN provider abandon them.

So I guess, what I need to do, is to replace all the hosts in legacy URLs in the database with the new host, so [http://7xibfi.com1.z0.glb.clouddn.com/uploads/default/original/1X/735abc46bddabe584790cf2218d5d9bbc1f2501a.png](http://7xibfi.com1.z0.glb.clouddn.com/uploads/default/original/1X/735abc46bddabe584790cf2218d5d9bbc1f2501a.png) becomes [http://cdn.iosre.com/uploads/default/original/1X/735abc46bddabe584790cf2218d5d9bbc1f2501a.png](http://cdn.iosre.com/uploads/default/original/1X/735abc46bddabe584790cf2218d5d9bbc1f2501a.png), which keeps the same image accessible for always.

Is there a simple and rookie-friendly way to replace all the legacy URLs with the new one?

Thanks,

Yinglu

---

_[View the full topic](https://meta.discourse.org/t/how-do-i-change-the-legacy-cdn-urls-of-images-in-posts/97518)._
