# \[Solved\] "The redirect URI included is not valid." after mmost URL change

**URL:** <https://forum.mattermost.com/t/solved-the-redirect-uri-included-is-not-valid-after-mmost-url-change/931>\
**Category:** Troubleshooting\
**Created:** [February 20, 2016, 5:44pm UTC](https://forum.mattermost.com/t/solved-the-redirect-uri-included-is-not-valid-after-mmost-url-change/931 "2016-02-20T17:44:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Slimmons](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@Slimmons](https://forum.mattermost.com/u/Slimmons)\
**Post date:** [February 20, 2016, 5:44pm UTC](https://forum.mattermost.com/t/solved-the-redirect-uri-included-is-not-valid-after-mmost-url-change/931/1 "2016-02-20T17:44:24Z")

</div>

Hey, this issue has popped up [here](https://forum.mattermost.com/t/solved-gitlab-mattermost-8-0-4-sso-issue-the-redirect-uri-included-is-not-valid/346) and [here](http://forum.mattermost.com/t/the-redirect-uri-is-not-valid-during-oauth-on-on-new-gitlab-v8-2-2-omnibus-installation/633), but neither have answers that apply to me (I don’t think.)

I don’t have a proxy in place, and I’m at the current version, so I can’t update right now.

GitLab 8.4.4

I changed the url of mattermost from [old.mydomain.com](http://old.mydomain.com) to [new.mydomain.com](http://new.mydomain.com) in /etc/gitlab/gitlab.rb

```
mattermost_external_url 'https://new.mydomain.com'

```

When I go to **[https://new.mydomain.com/myteam](https://new.mydomain.com/myteam)** I get directed to the correct "Sign in to myteam on gitlab mattermost ‘with gitlab’ ". When I click Sign in with gitlab, I get directed to the Profile Settings page with this error “An error has occurred, The redirect URI included is not valid.” I did run gitlab-ctl reconfigure after the change to gitlab.rb. Not sure what else I can try right now. Any ideas?

---

<div class="post-metadata">

**Author:** ![jwilander](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/jwilander/32/8440_2.png) [@jwilander](https://forum.mattermost.com/u/jwilander)\
**Post date:** [February 22, 2016, 2:13pm UTC](https://forum.mattermost.com/t/solved-the-redirect-uri-included-is-not-valid-after-mmost-url-change/931/2 "2016-02-22T14:13:07Z")

</div>

Hi @Slimmons, you will need to do the following to fix your issue:

1. Login to GitLab as an admin
2. Go to the “Admin area” and click “Applications” in the sidebar
3. Next to the application “GitLab Mattermost” or something of similar name, click Edit
4. Update the URLs you see to match the host of your new `mattermost_external_url`
5. Click “Submit”

That should fix your issue. Let me know if it doesn’t work and I’ll help you troubleshoot.

---

<div class="post-metadata">

**Author:** ![Slimmons](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@Slimmons](https://forum.mattermost.com/u/Slimmons)\
**Post date:** [February 22, 2016, 3:31pm UTC](https://forum.mattermost.com/t/solved-the-redirect-uri-included-is-not-valid-after-mmost-url-change/931/3 "2016-02-22T15:31:37Z")

</div>

Ugh, I forgot all about the applications section. Thanks for the help, that fixed everything!
