🌐
GitLab
docs.gitlab.com › gitlab docs › use gitlab › deploy and release your application › gitlab pages › redirects
GitLab Pages redirects | GitLab Docs
In GitLab Pages, you can configure rules to forward one URL to another using Netlify style HTTP redirects.
🌐
GitLab
forum.gitlab.com › general
Why is there a redirect when I try to access my Gitlab Pages site? - General - GitLab Forum
February 14, 2022 - I used to have my personal blog on Github. However, I would like to always keep the source code of my blog private. My subscription as student will end there this year and I think I will not be able to renew it. So, I thought about publishing my blog here, with Gitlab, where you have unlimited ...
Discussions

"You are being redirected away from GitLab" pages don't redirect
For HTML artifacts, it actually used to render the page immediately. As I recall, due to an XSS security issue (because the HTML would run in the context of the domain gitlab.com), this has not been the case for maybe a couple years now. A similar XSS issue exists depending on how your pages [sub]domains are setup. So, as I understand it, to prevent someone from being pwned by clicking a gitlab.com link, you get the warning and the choice to click the button. That's also why now the default behavior for pages subdomains (for projects created after the issue was resolved) is to use a hash for each project. More on reddit.com
🌐 r/gitlab
13
2
May 22, 2024
GitLab Pages with custom domain redirects back to GitLab subdomain
I’ve set up a repository to use GitLab Pages Libby / tinie.st · GitLab It’s a static Nuxt 3 site. It’s visible here with no problems: https://tinie-st-horrorcheck-568f34c4e2491566b3d39fd7dd676a72e1c526cfc9.gitlab.io/ I… More on forum.gitlab.com
🌐 forum.gitlab.com
4
0
September 26, 2023
Gitlab Pages 'The redirect URI included is not valid.'
Here was the fix.. Add back the application for Gitlab Pages Auth Delete the Gitlab Pages dict from gitlab-secrets.json run gitlab-ctl reconfigure It's a bug: https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/3947/?_gl=1*1viqm3d*_ga*MTUzNzcxOTM0Ny4xNjgxMzQ4NTY2*_ga_ENFH3X7M5Y*MTY4MjUyNTk5OS4zNy4xLjE2ODI1MjYzMDAuMC4wLjA . More on reddit.com
🌐 r/gitlab
5
1
April 25, 2023
GitLab Pages redirects
@Grob Can you point me to documentation? I can’t find anywhere this [[redirects]] table. Should it be inside config.toml? I tried it, but it didn’t work. More on discourse.gohugo.io
🌐 discourse.gohugo.io
1
0
December 10, 2018
🌐
HUGO
discourse.gohugo.io › support
How to Configure 301 Trailing Slash Redirect for Github/GitLab Pages? - support - HUGO
November 24, 2020 - This may sounds silly but…how to configure the current 302 redirect to 301 (permanent) redirect for tailing slash URL? Example: https://www.example.com/en ----301----> https://www.example.com/en/ Hosting servers are Gi…
🌐
OpenMSCG
software.rcc.uchicago.edu › help
Redirects · Pages · Project · User · Help · GitLab
In GitLab Pages, you can configure rules to forward one URL to another using Netlify style HTTP redirects.
🌐
Reddit
reddit.com › r/gitlab › "you are being redirected away from gitlab" pages don't redirect
r/gitlab on Reddit: "You are being redirected away from GitLab" pages don't redirect
May 22, 2024 -

We have a few links to CI artifacts in our READMEs and project badges, so that it's easy to get to generated documentation and reports. These links are in this sort of format:

https://gitlab.com/mygroup/myproject/-/jobs/artifacts/main/file/dir1/dir2/dir3/index.html?job=build

When following one of these links, GitLab serves a page that says "You are being redirected away from GitLab" and then it has a link to the actual artifact hosted on GitLab pages, like:

https://mygroup.gitlab.io/-/myproject/-/jobs/1234567890/artifacts/dir1/dir2/dir3/index.html

I seem to remember that these "redirect" pages used to actually redirect to the latter address after a second or two, but it seems that they now require that you click on the link.

Am I misremembering the old behavior? Is there some way to get that behavior? Does anyone else find it kind of annoying having to always click on that second link?

🌐
Jozef
jozef.io › r915-gitlab-pages-own-domain
Porting and redirecting a Hugo-based blogdown website to an HTTPS-enabled custom domain and how to do it the easy way - Jozef's Rblog
May 11, 2019 - The traditional way of handling this is with server-side redirects - the server would issue an HTTP 301 Moved Permanently redirect to the new domain. The issue with that is that GitLab Pages does not support server-side redirects. On the other hand, redirects are supported by GitHub pages, ...
🌐
GitLab
docs.gitlab.com › ee › development › documentation › redirects.html
Redirects in GitLab documentation | GitLab Docs
Redirects reduce how often users get 404s when they visit the documentation site from out-of-date links. ... Users see the new page and can update or delete their bookmark.
Find elsewhere
🌐
PRACE
repository.prace-ri.eu › help
Redirects · Pages · Project · User · Help · GitLab
For more details, see GitLab Pages issue 649. Single page applications (SPAs) often perform their own routing using client-side routes. For these applications, it's important that all requests are rewritten to the root index.html so that the routing logic can be handled by the JavaScript application. You can do this with a _redirects rule like:
🌐
GitLab
gitlab.com › gitlab.org › gitlab-pages › #24
Add simple redirect configuration (#24) · Issues · GitLab.org / gitlab-pages · GitLab
September 18, 2020 - Problem to solve The current advice for redirects in GitLab pages is to use meta...
🌐
GitLab
forum.gitlab.com › how to use gitlab
GitLab Pages with custom domain redirects back to GitLab subdomain - How to Use GitLab - GitLab Forum
September 26, 2023 - I’ve set up a repository to use GitLab Pages Libby / tinie.st · GitLab It’s a static Nuxt 3 site. It’s visible here with no problems: https://tinie-st-horrorcheck-568f34c4e2491566b3d39fd7dd676a72e1c526cfc9.gitlab.io/ I set up a custom domain, tinie.st, and verified it and everything looks good on the Custom Domain page.
🌐
Reddit
reddit.com › r/gitlab › gitlab pages 'the redirect uri included is not valid.'
r/gitlab on Reddit: Gitlab Pages 'The redirect URI included is not valid.'
April 25, 2023 -

Hey guys,

I'm working on a migration of our Gitlab CE instance from a docker compose environment to a dedicated EC2 Runner and Server.

I've got everything working so for except Gitlab Pages. I've followed the documentation here: https://docs.gitlab.com/ee/administration/pages/

I've created the following DNS records.

A record for Gitlab git.dev.company.cloud

A record for Gitlab Pages gitdocs.dev.company.cloud

A record for wildcard *.gitdocs.dev.company.cloud

The omnibus configuration file contains: pages_external_url 'http://gitdocs.dev.company.cloud'

I navigate to the pages section of a project and click on the URL. A redirect begins, but instead of sending me to pages it sends me to my user page and displays:

An error has occurred
The redirect URI included is not valid.

The NGINX logs for pages show a 302 redirect, but that is about it...

Any help would be much appreciated!!

🌐
GitLab
forum.gitlab.com › how to use gitlab
Gitlab pages redirects do not work - How to Use GitLab - GitLab Forum
February 22, 2024 - I came across this forum as I was running into similar issues with redirects in GitLab Pages. First, make sure the redirects are in a file called “_redirects” in the public directory. At first, I made a typo when naming the file, so obviously none of the redirects would work · The other ...
🌐
Stack Exchange
webmasters.stackexchange.com › questions › 137455 › www-domain-not-working-with-gitlab-pages
web hosting - 'www' domain not working with GitLab pages - Webmasters Stack Exchange
November 10, 2021 - Did you verify your domain with GitLab? Also, your CNAME record and your "Redirect" (pseudo-)record conflict, you'll want to remove one of them. Remove the CNAME if you want your registrar's server to handle the redirect, remove the "Redirect" record if you want GitLab Pages to handle the redirect.
🌐
Reddit
reddit.com › r/gitlab › self hosted gitlab redirecting
r/gitlab on Reddit: Self hosted gitlab redirecting
July 29, 2022 -

Hi all,

I'm having trouble with my Gitlab (self-hosted) working after an upgrade. I'm relatively confident that it isn't my reverse proxy.

My setup is as follows:

Cloudflare -> Reverse Proxy (separate VM) -> GitLab (Separate. VM)

My Nginx(reverse proxy) config is as follows:

server {
    # bind domain
    server_name subdomain.domain.tld;
    location / {
        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Forwarded-Server $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass  http://192.168.1.91;
    }
    # logs
    access_log /var/log/nginx/gitlab_access.log;
    error_log /var/log/nginx/gitlab_error.log;

    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/subdomain.domain.tld/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/subdomain.domain.tld/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

}
server {
    if ($host = subdomain.domain.tld) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


    listen 80;
    server_name subdomain.domain.tld;
    return 404; # managed by Certbot

}

Problem

Whenever I go to subdomain.domain.tld i am redirected to domain.tld

Everything was working before I upgraded - I am wondering, is there a command I need to run to get it up again?

Gitlab appears to be running, and no firewall rules blocking

🌐
GitLab
gitlab.com › gitlab.org › repository
doc/user/project/pages/redirects.md 01673739a04fc4304e867fb2144b8571e80a6a51 · GitLab.org / GitLab · GitLab
GitLab is an open source end-to-end software development platform with built-in version control, issue tracking, code review, CI/CD, and more. Self-host GitLab on your own servers, in a...
🌐
GitLab
gitlab.com › gitlab.org › #14243
Redirect from GitLab pages URL to custom domain when one exists (#14243) · Issues · GitLab.org / GitLab · GitLab
February 17, 2016 - Problem to Solve Today, GitLab Pages does not redirect to custom domains when exists, which degrades efficiency of users as well...
🌐
GitLab
docs.gitlab.com › gitlab docs › use gitlab › deploy and release your application › gitlab pages › settings
GitLab Pages settings | GitLab Docs
If you use a custom domain and try to access /non/existing_file, GitLab Pages tries to serve only /404.html. You can configure redirects for your site using a _redirects file.