- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在 GitHub 上有一个项目,它存在于一个私有(private)存储库中,我不是它的所有者而是合作者,它是我 friend 的存储库。
我的目标是为我们的网站制作一个登陆页面,因此,当我们从 NameCheap 购买域名时,我关注了 this tutorial .
问题是,我们有两个域,一个是 swopular.de
,另一个是 swopular.com
。
我的想法是像这样将它们都放在 CNAME 文件中:
CNAME
swopular.de
swopular.com
但是现在当我尝试访问该站点时出现以下错误:
404
There isn't a GitHub Pages site here.
If you're trying to publish one, read the full documentation to learn how to set up GitHub Pages for your repository, organization, or user account
我在上面发布的教程中引起我怀疑的是这一步,在 NameCheap 服务器上我应该...
Here you will need to create three records for your domain:
- A record for @ pointing to 192.30.252.153
- A record for @ pointing to 192.30.252.154
- CNAME record for www pointing to your username.github.io (username should be replaced with your actual GitHub account username):
我把 username.github.io
放在我想为其创建站点的项目实际上存在于存储库中,该存储库是该存储库的子域 - 但 NameCheap 不允许我输入子域到那个字段,比如 username.github.io/XXX
也许在网络开发方面有更多经验的其他人可能知道我该如何解决这个问题?
最佳答案
Github Pages 的CNAME
文件只支持1 个CNAME。 ( https://help.github.com/articles/about-supported-custom-domains/ )
我建议您选择一个域作为主要域。由于 de
是国家/地区特定的 TLD,而 com
是通用的,因此我会选择 com
。
要允许您的域托管在 www.swopular.com
并将 swopular.com
重定向到 www
子域,CNAME
文件应该只包含 www.swopular.com
。与之关联的 DNS 记录应该是您提到的那些,
- A record for @ pointing to 192.30.252.153
- A record for @ pointing to 192.30.252.154
- CNAME record for www pointing to your username.github.io (username should be replaced with your actual GitHub account username):
服务器端应注意将附加扩展名添加到 CNAME
记录,仅在 CNAME< 中包含
[username].github.io
/code> 记录
对于
de
域,我建议使用 Namecheap 的 HTTP 重定向服务。 ( https://www.namecheap.com/support/knowledgebase/article.aspx/385/77/how-do-i-set-up-a-url-redirect-for-a-domain ) 然后您可以将根 de
和 www.swopular.de
重定向到 www.swopular.com
关于subdomain - 一个 CNAME 文件用于 2 个不同的域。 gh-pages X namecheap,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36463530/
我正在创建软件,允许用户拥有自己的自定义子域(例如: theirsubdomain.mydomain.com)或将 CNAME 从他们自己的域指向我的网站地址(例如: theirsubdomain.t
我在 Github 页面上设置了一个自定义域,我将其设置为 www.dineshraj.com,我的注册商上有一条 CNAME 记录,内容如下: CNAME www.dineshraj.com din
我很困惑为什么我的 github 页面存储库中也需要 CNAME 文件?为什么 CNAME 需要在我的域提供商和 github 页面上完成两次? 这些东西是如何协同工作的? 最佳答案 当一个 http
关闭。这个问题是off-topic .它目前不接受答案。 想改善这个问题吗? Update the question所以它是 on-topic对于堆栈溢出。 8年前关闭。 Improve this q
例如,我有一个带有自定义域的 GitHub Pages 站点。 以下是该域的 DNS 记录: 此 CNAME 记录是否公开? 或者是否有人可以通过我的自定义域 ajzbc.com 确定 GitHub
公司决定实现地理定位多区域解决方案。选择流量管理器地理来路由区域之间的流量。但有一些问题。 之前的解决方案基于一个区域,域格式为subdomain.domain.com。 DNS 中的 A 记录指向负
我第一次尝试在 Azure 上设置网站并遇到 DNS 问题。遵循本教程http://www.windowsazure.com/en-us/develop/net/common-tasks/custom
每次我们对后端进行更改,需要更改客户的 DNS 设置时,我们都必须经历一个漫长的过程,包括电子邮件、电话、电子邮件提醒等,以便让每个人都实现必要的更改. 为了一劳永逸地简化这个过程,我做了以下操作:我
任何人都无法通过Powershell远程处理来处理CNAMES或主机文件。 一种测试方法,针对本地主机创建PSsession以确保其正常工作...然后将主机记录命名为127.0.0.1,然后尝试针对该
我将 CNAME 与 S3/CloudFront 一起使用来提供一些静态文件,例如 js、css、图像等。 我这样做是为了使存储桶的 URL 更漂亮,因为我认为最好将所有内容都定位到我的网站,以防万一
我已在 Azure 上设置了我的第一个站点。我们将其命名为“mysite.org.uk”。我已将文件作为共享 Azure 网站上传到 Azure。可通过“mysite.azurewebsites.ne
已关闭。这个问题是 off-topic 。目前不接受答案。 想要改进这个问题吗? Update the question所以它是on-topic用于堆栈溢出。 已关闭10 年前。 Improve th
所以我为我的域创建了一个 CNAME。例如: mycname.domain.com 但所有带有 CNAME 的 URL 都会显示在搜索引擎中。如何防止这些 URL 被抓取?我想我必须编辑 robots
如果我去 www.example.com,它的页面上有一个链接到 assets.example.com 的图像,它是 assets.example2.com 的 CNAME。 即使 assets.ex
我正在 Azure 上设置 VPS,但一直停留在配置 CNAME 上。该网站已向第三方注册。 我已设置以下内容: NAME TYPE TTL VALUE @ NS 120 ns1
我在 Tumblr (faithfullforever.tumblr.com) 上有一个博客,它使用自定义域 www.mariannefaithfull.fm。昨天我很快停用了 Tumblr 上的自定
我在 myDomain.com 上自行托管我的个人网站,这是一个由 apache 提供的 flask 应用程序。我正在使用静态站点生成器和 netlify 创建个人博客,我希望将其托管在 blog.m
我不太了解如何在我的应用中使用自定义域。这是拥有将用户分配给子域的应用程序的常见情况,例如。 user.theapp.com 并且他们想要使用 CNAME,因此 m.theirsite.com 解析为
我在我的域上定义了一组子域,如下所示: CNAME sub1.example.com -> sub1.herokuapp.com CNAME sub2.example.com -> sub2.apps
使用 CNAME 记录在 Azure 中验证我的域后,我可以从 DNS 服务器安全地删除 CNAME 记录而不破坏任何内容吗? 最佳答案 您可以安全地删除awverify记录。这些仅在验证自定义域(同
我是一名优秀的程序员,十分优秀!