# Enable a CDN for your Discourse

**URL:** https://meta.discourse.org/t/enable-a-cdn-for-your-discourse/14857
**Category:** Self-Hosting
**Tags:** cdn, configuring, how-to
**Created:** [April 18, 2014, 7:51am UTC](https://meta.discourse.org/t/enable-a-cdn-for-your-discourse/14857 "2014-04-18T07:51:41Z")
**Posts on this page:** 1
**Showing post:** 102

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [August 26, 2022, 3:55pm UTC](https://meta.discourse.org/t/enable-a-cdn-for-your-discourse/14857/102 "2022-08-26T15:55:50Z")

</div>

Thank you for this clue!

I guess it’s this?

```ruby
DbHelper.remap('from', 'to')

```

Found on [Rebaking old posts won't pull new S3 CDN URL after S3 bucket rename - #10 by Brad\_Wood](https://meta.discourse.org/t/rebaking-old-posts-wont-pull-new-s3-cdn-url-after-s3-bucket-rename/175882/10)

And used here:

> <https://github.com/discourse/discourse/blob/1472e47aae5bfdfb6fd9abfe89beb186c751f514/lib/file_store/to_s3_migration.rb#L289>

If it’s a safe alternative to a rebake when changing our CDN service, a #howto could be nice indeed.

---

_[View the full topic](https://meta.discourse.org/t/enable-a-cdn-for-your-discourse/14857)._
