# יצירת הפניות 301 מאתר Discourse ישן לאתר חדש

**URL:** <https://meta.discourse.org/t/create-301-redirects-from-an-old-discourse-site-to-a-new-one/174298>\
**Category:** Marketplace\
**Created:** [26 בדצמבר,‏ 2020,‏ 4:41pm UTC](https://meta.discourse.org/t/create-301-redirects-from-an-old-discourse-site-to-a-new-one/174298 "2020-12-26T16:41:26Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Arta\_S](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arta_s/32/537495_2.png) [@Arta\_S](https://meta.discourse.org/u/Arta_S)\
**Post date:** [26 בדצמבר,‏ 2020,‏ 6:52pm UTC](https://meta.discourse.org/t/create-301-redirects-from-an-old-discourse-site-to-a-new-one/174298/3 "2020-12-26T18:52:48Z")

</div>

I would just connect the old domain name to a cpanel hosting (or any hosting at all, something to host the domain) and then using htaccess make the redirect. Since the old domain is being redirected and all the content is already migrated, the goal is to redirect the old domain name to the new one. Considering that, it doesn’t matter if the old domain is still contented to a discourse install.

This way you don’t even have to keep the old server’s instance.

You can use something like this:

```plaintext
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !new-example.com$ [NC]
RewriteRule ^(.*)$ https://new-example.com/$1 [L,R=301]

```

Above code will follow the old links to new ones. So if the old url is [old-example.com/t/anything](http://old-example.com/t/anything) , it will be redirect to [new-example.com/t/anything](http://new-example.com/t/anything)

---

_[View the full topic](https://meta.discourse.org/t/create-301-redirects-from-an-old-discourse-site-to-a-new-one/174298)._
