custom domain mapping to subdomains - domain-mapping

I have searched and have not been able to find anything helpful.
I have a mydomain.com that is setup to allow wildcard subdomains (*.mydomain.com).
I need to be able to have clientdomain.com point to clientdomain.mydomain.com.
I've setup a CNAME clientdomain.com > clientdomain.mydomain.com, though I get the standard CPANEL error page since clientdomain.com is not configured on that host.
I need to be able to do this on the fly - so I cannot ad a hostrecord for each domain, unless there is a way to do it programmatically.

CNAME record will not work as the parent and source domains are not hosted on the same server.
You will have to the redirection feature in cpanel to get this task done by creating proper subdomain. You can set the redirection through redirection option in cpanel.

Related

Mutiple wildcard domains on same subscription with Plesk Obsidian

I’m using Plesk Obsidian and I need to host an application on it (a website builder).
On this application, users can create websites on subdomains, and the application will determines what website to show itself by checking the subdomain. Multiples main domain are available.
website1.domain1.com
website2.domain2.com
website3.domain3.com
All the main domains (domain1.com, domain2.com and domain3.com) and also all the subdomains must:
Go to the same directory in server
Be secured by a SSL certificate
Also, as users can also have a custom domain, I need to be able to add it and set the same directory in server and get a SSL certificate.
I’ve tried to create a service plan and a subscription and added the first domain (domain1.com) to it.
For the others domains, I’ve added an alias (domain2.com and domain3.com).
The problem is that I can’t add the wildcard for those 2 domains and have a wildcard SSL neither.
So accessing to anything.domain2.com result to a NET::ERR_CERT_COMMON_NAME_INVALID error.
For others domains set as alias, SSL need to be regenerated each time we add a new domain and they're are bonded to the main domain...
If it's not possible through Plesk interface, I'm not against build a custom script launched in command line.
However, I don't know were I can put those custom generated virtualhosts without risking to be erased on Plesk update.
You can set up a wildcard SSL as far as you use a CA that admits wildcards on the SAN (which nowadays are almost all of them).
Concretely, if you want free certificates issued by Let's Encrypt, you just need to follow the following steps:
Log in to Plesk
Install the Plesk extensions SSL It! and Let's Encrypt
Go to Domains > domain1.com > Hosting Settings
Make sure SSL/TLS support is enabled
Go to Domains > domain1.com > SSL/TLS Certificates
Click on Install > More options > Install a free basic certificate provided by Let's Encrypt
Select explicitly Secure the wildcard domain
Click on Get it free
Same for the rest of the domains.

Redirecting sub-domain to specific URI

I want to redirect my subdomain to specific URI without making any changes to my code.
I found the domain forwarding services from Bigrock, they have a sub-domain forwarding service which specifies all subdomains will be redirected as "subdomain.mydomain.com to yourdestinationurl/subdomain/"
I replaced yourdestinationurl, with www.mydomain.com but it's not working.
Am I doing something wrong?Is there any alternative way to do this?
You may create the subdomain in the DNS Manager/Domain name zone file and point it to any URL using 'URL-Redirect' DNS record.
In other words, you need to login into the account of your domain name registrar (if the domain name is delegated to the default nameservers) or into your hosting cPanel (if you have a hosting plan). Then you need to find where to configure DNS records and configure URL-Redirect (also called URL-Forwarding) for your subdomain.
There is no need to have any plugins.

Plesk and domain hosted externally

I have two hosting accounts (Personal one and a work one). I am doing some testing and would like to create a subdomain of a work domain (manage.domain.com) and host it on my personal account. Currently, my personal host is through 1and1 and is dedicated while the work one is shared with GoDaddy.
Work
I have gone into go daddy and created the subdomain. I have also added DNS records such as A, AAAA AND NS (i did not record a CNAME). I have noticed that if is type manage.domain.com it is redirecting to my personal server. However, it is directing to the blank admin page of the root of the server (which is maintained using Plesk).
Personal
Using Plesk I added the website (domain.com) and created the subdomain (manage.domain.com). I have also updated the websites hosting access using Plesk and assigned it the default values of my personal account. Using Plesk I also set the subdomain to the particular location of the files I want to test. However, I cannot get my server to recognize the address and redirect it to the proper location.
Any help is greatly appreciated!
J
You can just create:
in personal account domain(not subdomain) manage.domain.com
on domain.com add DNS record of type A, name "manage" and IP address of personal hosting:
After that "manage.domain.com" will resolving to hosting of your personal account and can be accessed because such domain exists.
I figured it out
What i did above was correct expect do not change the name servers on the work DNS(godaddy).
Add the website to plesk - it will give you an error about not being able to control the DNS settings which you have already adjusted on the original server (godaddy)
Add a subdomain of the website.
*** Ensure the subdomain is pointed to the correct folder within your server
Done

IIS Redirects - Redirecting domain without website binding

I have a bunch of domains (50+), e.g. example1.org example2.org, example3.org that I would like to redirect (301) to a single domain, examplethebest.org. Nothing is hosted on any of these domains other than examplethebest.
I've set up all the example domains in the registrar's DNS to point to the IP of my web server.
I was wondering if redirecting these is something I could achieve via rewrites in the applicationHost.config file. Or do I need to add bindings for example1 - example3.org in examplethebest's website bindings?
Just wanted to add that I understand how to do the rewrites via the web.config in examplethebest if I add bindings for the domains I want to redirect, but would rather not have loads of domain bindings - e.g. what is best practice here? Thanks!
Okay so the issue I had on this particular web server was that the default website (listening to all requests on port 80) was stopped - the other websites all had specific bindings.
At least two possible solutions for this one:
Starting the default website and adding {http_host} rewrites in there
Creating another website, make it listen to all requests on port 80 with just a web.config and putting the {http_host} rewrites in there.
We went with option 2.

Subdomain redirect to subdirectory

I have a domain in which I want the subdirectory to be shown as a subdomain in the url.
I do not want it to be a subdomain because it'll cause problems with the integration of two cms's that I have.
I would like
forum.domain.com -> domain.com/forum
to redirect to there but I would also like it to keep saying forum.domain.com in the url and not change to /forum.
I do have access to the DNS zones but I am completely lost on how to do this. So far my forum.domain.com is a website by itself in which I do not want it to be.
*Server Htaccess is running helicon ape.
This cannot be done purely through DNS. It's not hard, but it does involve your web server's configuration.
In DNS, create a CNAME (an alias) for forum.domain.com to point to your server, probably domain.com.
In your webserver's configuration, configure a new virtual host with that path as its document home. The way you do this will depend on whether you use Apache, Nginx, etc.