Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom domain leading to GitHub pages 404 #703

Closed
dav-s opened this issue May 6, 2014 · 13 comments
Closed

Custom domain leading to GitHub pages 404 #703

dav-s opened this issue May 6, 2014 · 13 comments

Comments

@dav-s
Copy link

dav-s commented May 6, 2014

Hi!

I just started using the prose.io website. In my short time with it, I found that when I click "View Site" on a project, it redirects me to a GitHub pages 404 page.

For example, I have a GH pages site EpicDavi.github.io that is connected via CNAME to my domain, daviskr.com.

When I authorize/log into prose.io, I see that that project has the option "View Site" next to "View Project". When I click on "View Site", I am redirected to the URL prose.io/daviskr.com. This page is a 404 page for GitHub pages, stating "Page not found" and "There isn't a GitHub Page here." I don't think this was supposed to happen.

This issue also persists for other projects of mine that have GitHub pages. They redirect to the same 404 page but with the project name appended to the URL.

I am using FireFox 29.0.

Thanks!

@Arcath
Copy link

Arcath commented May 15, 2014

Looks like your repositories URL is set to daviskr.com and not http://daviskr.com. I assume that although Github correct the "issue" when they display the link the fix isn't passed to the API for prose to use.

All my View Site links work fine with http:// at the beginning of the URLs.

Without the http:// browsers wont assume that you wan't a different website and will just run the link relative to your current path.

@dav-s
Copy link
Author

dav-s commented May 15, 2014

Ah, I see. I thought it was based on if it had a gh-pages branch and then formed the link. Did not realize it was based on the link in the repository title.

But still, my repository has always had the link in the title of:
croppercapture 5
And the link still isn't correct.

@mxstbr
Copy link

mxstbr commented Aug 4, 2014

You need to add file named CNAME (all caps) to your root directory, and only write a single line into it: the domain that redirects to your website.

See this help article: https://help.github.com/articles/adding-a-cname-file-to-your-repository

@dav-s
Copy link
Author

dav-s commented Aug 6, 2014

@mstoiber This isn't the problem at all. My GH pages page works fine. As @Arcath was mentioning, there seems to be a discrepancy between the site link on the GitHub API and what is displayed on the project repository page (prepends http:// to the link if not present). This is not at all related with GitHub pages and the real issue is that http:// is not prepended to links from the GitHub API that are absent of it (causing odd behaving links).

@hdgarrood
Copy link
Contributor

Suggest changing the title to 'repo homepage without url scheme should default to http'?

@mikemorris
Copy link
Contributor

So this is just echoing out the repo homepage key directly from the the /repos GitHub API endpoint.
https://github.com/prose/prose/blob/master/app/models/repo.js#L13
https://github.com/prose/prose/blob/master/templates/li/repo.html#L29-L31

We shouldn't add any extra logic here, but clarifying how to configure this in the Wiki should help.
screen shot 2014-08-29 at 12 56 22 pm
screen shot 2014-08-29 at 12 56 45 pm

@ghost
Copy link

ghost commented Aug 29, 2015

@EpicDavi I was having the exact same issue as you just now, but adding a CNAME file--as @mxstbr suggested above--fixed the problem. I just had to follow the directions on the Github Help page that he appended to his comment.

@khoad
Copy link

khoad commented Aug 12, 2016

In my case, I had the CNAME file but somehow I created the CNAME file with exe permissions. After chmod -x CNAME, it worked for me.

@cs14rendra
Copy link

i had "madebysurendra.xyz" in my CNAME file, i changed it to "http://madebysurendra.xyz". i added two ip " 192.30.252.153, 192.30.252.154" in my A type and "cs14rendra.github.io" to CNAME on my DNS side. its working now.

@armujahid
Copy link

adding permalink: /404.html to the frontmatter fixed for me

https://help.github.com/articles/custom-404-pages/

@VMasanabo
Copy link

VMasanabo commented Oct 30, 2018

i had "madebysurendra.xyz" in my CNAME file, i changed it to "http://madebysurendra.xyz". i added two ip " 192.30.252.153, 192.30.252.154" in my A type and "cs14rendra.github.io" to CNAME on my DNS side. its working now.

This worked for me.

Thank you.

@ctlove0523
Copy link

How to fix this:
The Host is not resolvable,please make sure the URL is correct.

@ghost
Copy link

ghost commented Jan 19, 2019

i had "xiaohujiazi.top" in my CNAME file, i changed it to "xiaohujiazi.github.io".
its working now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests