is possible to keep original username.github.io working with a custom domain too? #171345
Replies: 4 comments 2 replies
This comment was marked as off-topic.
This comment was marked as off-topic.
-
|
By default, if you set a custom domain in GitHub Pages, Workarounds:
In short: GitHub Pages forces the redirect, but you can still keep both URLs alive by splitting into two repos/sites. |
Beta Was this translation helpful? Give feedback.
-
|
There's also cloudflare "workers." You can automatically deploy a site there from a github repo. Put your custom domain on it. Then the username.github.io would work like nothing's different. The domain name would point to a "mirror" at the copy on cloudflare. The url would be project.username.workers.dev. From what I've read, that url contnues to work after adding a custom domain. So, you'd have 3 different URLs to the same content. (This would be similar to irkishanna's suggestion to have two repos on github. Instead, you'd have one and deploy from it to Cloudflare workers, and get another generic url out of it as well.). If you use cloudflare as your DNS (for your domain name), then it could even make sense to point it to the workers site instead? I know you get more configurability (page rules, redirects; steeper learning curve, though.). If you use cloudflare dns "proxy" enabled, I've read that can be problematic if you point to github pages. Something about github's "lets encrypt" certificate expiring, and cloudflare's proxy requiring https connection. A deadlock ensues. You have to configure cloudflare for "flexible" https, or some other rules I read about. (I haven't setup a custom domain yet here or there. That topic made me think I'd do ordinary cloudflare DNS to gitub pages. But, now that I learn the username.github.io/project will redirect to the domain name, I'm thinking I'll point to cloudflare workers instead. If I do that, then maybe DNS proxy-enabled might make sense since it's all internal to cloudflare. [1] There's also Cloudflare Pages, but they're encouraging people to use Workers. Pages is easier to do a static site, but the url used with it is limted to name.pages.dev (name isn't unique. You could end up with name-L1R.pages.dev. Workers gives you a url that doesn't struggle to be unique that way. (Either way, you wouldn't use the URL. You'd setup pages or workers with the intention to just build your site from github's repo, and access it with your custom domain. |
Beta Was this translation helpful? Give feedback.
-
|
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Question
Body
Hi,
I have my mydomain.org , I set it in pages to my username.github.io and it created a CNAME on the repo.
My question is if it is possible to keep both alive? I mean when user enter on username.github.io it dont redirect to mydomain.org.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions