Possibility to host site content on one domain and access it via another - dns

I have site1.domain1.com and site2.domain1.com
Is it possible to access to site2.domain1.com via domain2.com via cname or some other possibility?
So idea is to has content hosted at our server and allow user to access it via their own domain.
Is it possible somehow?
thanks
Regards,
Ilija

Both domain should point to same IP direction to get the same site. You need to configure your second domain domain2.com with same IP direction than site2.domain1.com

Related

How to allow CNAME pointed to my server / how to use subdomain for a different server?

We create custom web apps for businesses and for the first time a client of ours has asked that instead of using our subdomain and instead of using a custom domain for their web app they would like to use their own subdomain for a domain currently hosted on another server.
For instance our domain is webapp.com and their domain is business.com. They would like app.business.com to be point to our name servers so we can continue hosting the web app for them.
I know it's possible to do this because we currently have outgoing CNAMEs on our server for help desks, etc, that aren't hosted on our own server but are using subdomains of ours.
Could you help me with what our client has to do on their zone editing side and what we need to do on our WHM/cPanel side to allow this?
NOTE: We had the client create a CNAME for app.business.com. pointed to our nameserver ns1.webapp.com and then we created an add-on domain for business.com and subdomain for app.business.com but when you try to visit app.business.com it gets the "Sorry!" cPanel page.
Thank you!
Alright I figured out how to do it on my own after a lot of testing & thought I'd post here to help others out in case they run across this in the future.
For the server with the subdomain on it have them create an 'A' record for that subdomain pointing to your server's IP address like so:
subdomain.business.com. ((note the extra period at the end is required))
TTL: 14400
Record Type: A
Pointing To: Your server's IP address.
Now on your server's cPanel you will need to create an addon domain for THAT subdomain (ie subdomain.business.com) - not for the actual business.com domain but for the entire subdomain subdomain.business.com with the folder being the root folder wherever you would like it to show.
That worked for me!
The CNAME should not point to your nameserver but your subdomain f.e. client1.webapp.com.
An other solution could be to add the subdomain app.business.com to your server and the client add an A record for the subdomain to your ip.

Adding one more domain to my Hostgator server

My client has bought two domains for his website: goiasverdade.com.br and goiasverdade.com
The main domain is goiasverdade.com.br, but he wants to redirect the visitors who enter the .com domain to the .com.br.
The .com.br domain is already registered in the Hostgator server. But now I don't know how to add another domain to the server and also redirect it to the main .com.br address. I have the DNS address for the .com domain, but where do I add it in the server Control Panel?.
Thanks for the help guys!
I think you'd want to add the extra domain name as an add on domain. Then I think you'd want to redirect the domain so that it redirects (forwards) to the other one.
Then you'll of course want to test everything to make sure everything works. If you're a developer, you may want to look at Digital Ocean or Linode hosting if you want to have more control over your servers.

How to create a subdomain that points to a service on a port in Z-Admin?

In Z-Admin I Would like to create a subdomain that points to a Service on the same domain but to a specific port.
Example:
I want glassfish.mydomain.com to point to mydomain.com:8080
How is possible to do that?
If you're administrative panel has a DNS manager then you can do this by assigning where subdomain.domain.tld points by use of an A record.(For example)
If not, you'll want to setup a record with your current domain registrar to send requests for your subdomain to the subsequent address

Block access to a redirected subdomain on an IP basis

I have a subdomain (mail.mywebsite.com) that points to the login page that I've set up for Google apps (per their instructions). I'm currently using a CNAME record to point users to the page.
However, I'd like to restrict access to this subdomain on an IP basis (effectively create a whitelist).
Not sure if modifiying .htaccess on my server is an option, as the domain is configured in the registrar to forward to Google, not content on my server.
Any suggestions for how I could accomplish this? Thanks in advance!
If you've done this using a DNS CNAME, you have no control over who can access mail.mywebsite.com since it's not even your server that's accepting requests (it's Google's server).
Unless there's some way to setup access restrictions on Google, there's not going to be anything that you can do.
Alternatively, you can change the CNAME to point to your server, then use a reverse proxy to proxy the requests to Google. You can then use access controls to setup what IPs will be proxied and all the rest will just get 403'ed. Can't setup ProxyPass in htaccess file though, need to do it in server/vhost config, but you can use the P flag in mod_rewrite to reverse proxy for you.

Multi-tenancy DNS setup - how to?

Sorry for the completely newbie question, but I really do not seem to understand how this would be done.
Can you automate the creation of sub-domains for a multi-tenant application that is hosted? Say for example a new customer signs up and specifies the sub-domain of choice. user1.mysite.com.
How do I automate the creation of the sub-domain and have it point to the single instance of my application? If yes, how do you go about doing this? Any samples or links would be most appreciated.
Thank You
You don't create subdomains, you create a wildcard DNS record.
*.mysite.com A 1.2.3.4
If you have owned the domain, you can create a subdomain manually in the configpage of your domain provider. The provider will have to config the subdomain for you(input subdomain and IP mapping into DNS Server). This could delay for some hours.
After that, you can create another mapping between your documentroot(where you application lives) and subdomain with . see more details here.

Resources