-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
CNAME goes to wrong project and/or a 404 #3179
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
Comments
If it's a mistake many people make, it's a problem if we don't have that in the documentation to help people out. Either way, we need to fix this workflow. :) |
WORKAROUNDOnly use lowercase in de domain-field This kind of solves it ....It depend op capitals in the Admin ->Domain - > ... field
(still, it a bug: in code or docs)Plz doc it. Or better: use .lowercase() before using the setting. Thanks |
Sounds like a good fix! https://github.com/rtfd/readthedocs.org/blob/master/readthedocs/projects/forms.py#L546 would be a good place to implement it 🎆 |
@stsewd I would like to work on this issue. Can you guide me as I am totally new here. |
@dojutsu-user this should be fixed here https://github.com/rtfd/readthedocs.org/blob/2d9ca7df405a15c3e7e278c68c3fb9f98fe13d36/readthedocs/projects/forms.py#L646 I guess, but first, you should test that this behavior persists in the current version of rtd. |
@stsewd I registered a free domain and added the CNAME records (according to the docs) and then added the Domain in the readthedocs.org Admin Panel in CamelCase. It is working, when I tried to go to http://DOCS.DojutsuUserHelloWorld.Tk , the docs opened without any error. However, to prevent any issues in future, wouldn't it be better to store the domains in lowercase in the first place itself. def clean_domain(self):
parsed = urlparse(self.cleaned_data['domain'])
if parsed.scheme or parsed.netloc:
domain_string = parsed.netloc
else:
domain_string = parsed.path
return domain_string.lower() |
@dojutsu-user thanks for checking! @AlbertMietus is this still a problem for you? |
“DOCS” is not CamelCase!
Plz test with too; I think that was the part what triggered the bug (I filled). I can’t remember however the details
Next, when all test are ok, ...
It’s a good habit to check the code-changes between the then/now versions to verify code is indeed improved (To make sure; the test results isn’t changed by something else)
If & when, add a note to the bug report to summarize and mention the “commit(s)”, and close it
This feedback is just here, as you asked for assistance; possibly it’s not needed — but better to share a good engineering practice to often, as to little...
Thanks
…--albert
|
@dojutsu-user: When I click that link, it does NOT work (anymore?).
I tested it on Safari (Mac & iOS), Firefox (Mac); all the same. @stsewd: I guess, it nor really fixed Note: previous post ( by mobile/email) is maybe out-of-(time)-line |
So, I can't enter to http://docs.mio-lang.org/ either http://DOCS.DojutsuUserHelloWorld.Tk, I'll test this with a domain I own later. |
@stsewd I have changed the domain from camel case to lowercase. And now it seems to be working with me. Please confirm it from your side also. |
It works for me too! What was the exact domain that makes it fail? |
@stsewd exact domain was DOCS.DojutsuUserHelloWorld.Tk |
Wasn't that the same that was working yesterday? :_ |
@stsewd yes, this confusion might be from my side because CNAME records may take 2-3hrs to properly set up. And I tested it immediately. This might be the reason but I'm not sure about why it stopped working. |
@stsewd any update on this? |
This is still a bug @stsewd @dojutsu-user @AlbertMietus Brand new project (sft-protocol.readthedocs.io) Brand new domains (tried both sftprotocol.com and sft-protocol.com) Using the "docs" subdomain, everything gets redirected the SAME project as the OP's issue. ;; ANSWER SECTION: curl -v http://docs.sft-protocol.com/
< HTTP/1.1 302 Found I've never used CamelCase or any sort of capitals anywhere in the project settings or DNS. I've had to change the DNS records now so that the domains redirect in another way so the current records won't reflect what I pasted above. |
Did you setup a Domain object in your project dashboard? |
It looks like your DNS is not configured properly:
|
Thanks for the reploy @ericholscher I did setup the domains in my Admin panel on RTD: Existing Domains
I've since had to change the DNS so I can have the domain working and redirecting. Previous to this it was setup with the CNAME: ;; ANSWER SECTION: |
You have to setup the exact CNAME you want, so |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further. Thanks! |
Sorry for the bot, this is still valid. |
I am having this same problem, with a new project and the domain in lowercase. http://www.parasweep.io keeps resolving to http://docs.mio-lang.org/zh_CN/latest/. |
Starting after the next deploy, you'll just get a 404. This changed in #5143. The reason you're getting this is that you have not correctly setup your domain. Here's our documentation on the subject. |
Thank you so much! That fixed it. |
This is now shipped 👍 |
I would like to serve my 'MESS' project (http://mess.readthedocs.io/) from a own domain. So, I setup
CNAME support as described by: http://docs.readthedocs.io/en/latest/alternate_domains.html#cname-support
However, I doesn't work. Even after a log of variations and "debugging" (details below).
So, I assume it's a bug....
Effect & reproduce
Firstly, I assumed I made a mistake. And tries several variations -- no effect. And even created another new project; doing everything again; even with another domain (http://DocIdeas.mietus.nl/). Nothing improved. The latter link goes to the same "Chinese page"
Details
DIG
(Also see: https://toolbox.googleapps.com/apps/dig/#ANY/MESS.SoftwareBeterMaken.nl)
Setting
At RTfD: (project=MESS) Admin | Domains
I tried this with and without trailing dot -- no effect
Bug or Mistake?
As (I assume) many people use this feature, I can't imagine it;s a bug. So, when it's my mistake, please help. Or maybe it's a real bug. Then please fix :-)
Note: As A suggestion, I would be nice to be able to retrieve "logging/debugging" info about this, So I/others can get feedback on why which page, or symlinks, or ... is (mis)used. Than I would be able to fix my mistake
Something like the views on the "BUILD/..." page would be nice
(like: https://readthedocs.org/projects/mess/builds/6158940/)
Thanks for RTfD, ReadTheDocs.org and the help
--Albert
The text was updated successfully, but these errors were encountered: