Point multiple CNAME records to a subdomain in cPanel - subdomain

I want to point some subdomains to a single subdomain for a document library website I've created but I can't work out how to make the main subdomain show up by default. Eg.
library.site1.com
library.site2.com
library.site3.com
Point to library.mainsite.com
the default site is showing up on the mainsite hosting. It is currently shared hosting. Do I need to set a static ip for the subdomain?

I've just worked this out.. By using addon domains on the mainsite. Once I added entries for each subdomain it started working. I did have to disable "allow users to park Subdomains" and "all domain parking across accounts" under tweak settings in whm.

Related

Let netlify use a subdomain thats also used on a different site

(how) is this possible:
I have 2 netlify sites main-app and sub-app.
main-app has a custom domain (www.main.com).
I now want to make the 2nd site sub-app using the custom domain sub.main.com but Netlify forbids this and notes that I already use the respecity domain main.com.
Any help?
It is possible to use subdomains. It is discussed in detail in their docs: https://docs.netlify.com/domains-https/custom-domains/
You already have a Netlify subdomain where your app is hosted, of type myapp.netlify.app. Now you need to point your subdomain to this instance. If you use for example Namecheap, you do it like this: https://www.namecheap.com/support/knowledgebase/article.aspx/9776/2237/how-to-create-a-subdomain-for-my-domain/
Here is Netlify's instructions for doing this if you don't host your domain with them (aka not using Netlify DNS) https://docs.netlify.com/domains-https/custom-domains/configure-external-dns/
Similar DNS editing as in Namechrap will be seen on all other domain hosts. Once this is set up and has had time to propagate (give it 10 minutes to an hour) you proceed with hooking it up in Netlify. Your error message should now be gone.
Remember that you need different DNS records on your domain host for the main app and the sub app.
You can add a subdomain in the netlify panel and in you DNS manager / hosting provider add the records as CNAME with the domain provided by netlify.

Create a Github Pages subdomain while main domain is elsewhere

I am trying to host a custom subdomain with Github Pages.
My apex domain (http://example.com) is pointing to a custom server (not Github Pages).
I am trying to get a subdomain of this (http://subdomain.example.com) to host a Github Pages site off a project page.
I have created a CNAME record for the subdomain pointing to http://username.github.io but it comes up with this error:
Your site's DNS settings are using a custom subdomain,
subdomain.example.com, that's set up as an A record. We
recommend you change this to a CNAME record pointing at [YOUR
USERNAME].github.io. For more information, see
https://help.github.com/articles/setting-up-a-custom-domain-with-github-pages/.
I have also tried moving the project to its own Github organisation and pointing the CNAME to organisationname.github.io but it has the same result.
In both instances I have waited 24 hours for the DNS to propagate.
I have tried following the official tutorials and searching in StackOverflow for answers but have not been able to find anything for this situation.
Is this even possible to do or do the A records for my http://example.com domain affect all the subdomains below it?
Found a solution with Github support.
Turns out the answer is yes you can. I just had my apex domain configured to use Cloudflare and totally forgot about it. I made the changes described in my original post in Cloudflare and it all worked fine.

How to link my Google Domain to a custom HTML webpage

My team and I have recently purchased a Google Domain, but when trying to have the website it is connected to, it only gives us the options of website builders. We have a GitHub repository with all of our files that we want it to host, but again, only website builders. Can I make my Google Domain connect to a custom HTML page?
You can host your content on GitHub and serve them with GitHub Pages
https://pages.github.com
You can have your Google Domains domain point to it.
https://help.github.com/articles/using-a-custom-domain-with-github-pages/
You'll need to add a CNAME file to your repo with your domain URL in it. Add it manually or follow the instructions here.
https://help.github.com/articles/adding-or-removing-a-custom-domain-for-your-github-pages-site/
You'll need to add some A records at the Google Domains control panel with the IP addresses of GitHub's servers (currently 192.30.252.153 and 192.30.252.154).
https://support.google.com/domains/answer/3290350?hl=en

'Cloaked' domain forwarding not working as expected

I've registered a domain with www.domain101.com. We'll call it www.example.com. I used their 'cloaked forwarding' option on my heroku app, which we'll call example.herokuapp.com. If I want to navigate to the posts index page, I would go to example.herokuapp.com/posts, of course; however, when I try this with my cloaked domain - www.example.com/posts - it takes me to the landing page. What's more, the url is constantly set to 'www.example.com' and the title of each page is "EXAMPLE.COM". I can click buttons on the pages and navigate through my website, but the url remains strictly at 'www.example.com'.
I used the forwarding option available on the website. What else should I be doing?
Domain cloaking uses a frame to make visitors' browsers show the cloaking domain in the location bar, while having the actual content hosted somewhere else. That's why the location bar never changes when you navigate around the site; and it isn't surprising that domain101's cloaking implementation doesn't forward path information to your Heroku app.
What you should do instead is configure a DNS server to direct traffic for your domain directly to Heroku. The simplest option for that on Heroku is the Zerigo DNS Add-on, which is free if you're hosting a single domain. You can also find DNS servers provided by lots of other people if you prefer.
Once you've configured a DNS server, you also need to tell your registrar that the DNS server you chose is the primary DNS for your domain. The way to do that varies between registrars, so you should check domain101's documentation for details.

How do I move a site from one url to another?

I have an ASP.NET web application hosted on DiscountASP.NET with its domain name registered on GoDaddy. This site is working perfectly and runs great, but I hate the domain name.
So now, I decide to purchase a domain name I like better. How do I set it up so that this domain name runs the same web app as my original application, but using the new domain name instead of the old one (i.e. I don't want to redirect to the old url, I want everything to work under the new url)?
This should be quite simple. Go to the host/registrar of your new domain and point it to the same ip addresses that the godaddy url points to.
You can have the old url and new url coexist. The DNS servers just map to the the physical IP your app is hosted on.
If you've been naughty and use absolute urls/directories in your app, you will have to rewrite some code. All the while reciting the mantra... that's why I should have used relative references...
Either move the application files over and create a redirect from the old URL to the new, or set up a rewrite under the new URL to transparently pass requests to the existing one.