# How to redirect student to another domain after logout?

**URL:** https://discuss.openedx.org/t/how-to-redirect-student-to-another-domain-after-logout/348
**Category:** Site Operators
**Created:** [August 23, 2019, 5:08am UTC](https://discuss.openedx.org/t/how-to-redirect-student-to-another-domain-after-logout/348 "2019-08-23T05:08:48Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![LeonordLim](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/leonordlim/32/92_2.png) [@LeonordLim](https://discuss.openedx.org/u/LeonordLim)
#### Post date: [August 23, 2019, 5:08am UTC](https://discuss.openedx.org/t/how-to-redirect-student-to-another-domain-after-logout/348/1 "2019-08-23T05:08:49Z")

</div>

After the student logout, student will be redirected to home page. But i want to develop a marketing site, in which, the student after log out will be redirected to another domain, in which they will be offered some services.

How to set this?

---

<div class="post-metadata">

### Author: ![LeonordLim](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/leonordlim/32/92_2.png) [@LeonordLim](https://discuss.openedx.org/u/LeonordLim)
#### Post date: [August 23, 2019, 6:33am UTC](https://discuss.openedx.org/t/how-to-redirect-student-to-another-domain-after-logout/348/2 "2019-08-23T06:33:11Z")

</div>

I just solved it, i put  
Location /logout{  
Return 301 [http://example.com](http://example.com);  
}

---

<div class="post-metadata">

### Author: ![chintan](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/chintan/32/52_2.png) [@chintan](https://discuss.openedx.org/u/chintan)
#### Post date: [August 23, 2019, 8:01am UTC](https://discuss.openedx.org/t/how-to-redirect-student-to-another-domain-after-logout/348/3 "2019-08-23T08:01:02Z")

</div>

Does it logs out your user ? Or just simply redirects them to other site ? Just curious.

---

<div class="post-metadata">

### Author: ![LeonordLim](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/leonordlim/32/92_2.png) [@LeonordLim](https://discuss.openedx.org/u/LeonordLim)
#### Post date: [August 23, 2019, 9:52am UTC](https://discuss.openedx.org/t/how-to-redirect-student-to-another-domain-after-logout/348/4 "2019-08-23T09:52:29Z")

</div>

It log out the user first then redirect to the new site

---

<div class="post-metadata">

### Author: ![Anil\_Kumar](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/anil_kumar/32/497_2.png) [@Anil\_Kumar](https://discuss.openedx.org/u/Anil_Kumar)
#### Post date: [January 17, 2020, 7:18am UTC](https://discuss.openedx.org/t/how-to-redirect-student-to-another-domain-after-logout/348/5 "2020-01-17T07:18:48Z")

</div>

hello sir, can you tell me where to put these lines in open edx. means in which file and what is the path of that file

---

<div class="post-metadata">

### Author: ![LeonordLim](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/leonordlim/32/92_2.png) [@LeonordLim](https://discuss.openedx.org/u/LeonordLim)
#### Post date: [February 18, 2020, 4:39am UTC](https://discuss.openedx.org/t/how-to-redirect-student-to-another-domain-after-logout/348/6 "2020-02-18T04:39:50Z")

</div>

try to find nginx lms

---

<div class="post-metadata">

### Author: ![nadheemabdulla](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/nadheemabdulla/32/8233_2.png) [@nadheemabdulla](https://discuss.openedx.org/u/nadheemabdulla)
#### Post date: [December 30, 2020, 11:38am UTC](https://discuss.openedx.org/t/how-to-redirect-student-to-another-domain-after-logout/348/7 "2020-12-30T11:38:03Z")

</div>

Hi!  
Isn’t it possible by adding a redirect for /logout in django admin domain/admin/redirects/redirect/ ?

---

<div class="post-metadata">

### Author: ![Parvinkumar](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/parvinkumar/32/3894_2.png) [@Parvinkumar](https://discuss.openedx.org/u/Parvinkumar)
#### Post date: [July 10, 2022, 12:18pm UTC](https://discuss.openedx.org/t/how-to-redirect-student-to-another-domain-after-logout/348/8 "2022-07-10T12:18:36Z")

</div>

Hi @LeonordLim ,

I am facing this issue in Nutmeg. I am using with Tutor with Nutmeg. Please guide me how i will manage my logout url please guide me.

---

<div class="post-metadata">

### Author: ![Duc\_Trung\_Mai](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/duc_trung_mai/32/4713_2.png) [@Duc\_Trung\_Mai](https://discuss.openedx.org/u/Duc_Trung_Mai)
#### Post date: [January 3, 2023, 10:02am UTC](https://discuss.openedx.org/t/how-to-redirect-student-to-another-domain-after-logout/348/9 "2023-01-03T10:02:32Z")

</div>

For this, simply modify **logout.html** and you can do whatever you want.

If you’re using Docker/Kubernetes, it’s very easy since you just need to create the file as volume and mount it at run time to path **lms/templates/logout.html**

I did [federated logout with Keycloak](https://gist.github.com/maitrungduc1410/d42e8e1c20a2331decf9942b3c08e2d1) with same idea
