Godaddy subdomain not working - dns

I am having a hosting server and i want to create a subdomain for apis hosted on same server.What i want is suppose I have my domain name domain.com and want to have sub domain api.domain.com and set a folder path /public_html/api for it to load APIs.What I did is created a sub domain in Domains/subdomains section in cpanel and set folder path there and then created a CNAME pointing to IP of my server. but unfortunately when I open it, it gives me error Internal Server Error.
Please suggest what need to do for configurations ?
Thanks!

Click on the "Subdomain" option in cPanel and create your subdomain, pointing the root document to your desired folder /public_html/api
It might not update right away either. I just did this the other day, then I tried going to the new URL and it wasn't loading, I thought I did it wrong. I checked the subdomain the next day and it was working.

Wait for some specific time period, the domain will automatically be accessible after some time. actually, it needs some time to propagate and resolve IP associated with a particular sub-domain. it takes around 24-48 hours to resolve. To know more about this process, Please refer to the detailed explanation here

Related

Automatic subdomain creation and redirection

I would like to consult something in general. You can think of it like a portfolio site. Users will register on the site and they will be able to organize their portfolios as the subdomain of our project, for example, as username.domainaname.com. How can we serve the person's site as a subdomain. So how can we set these dns settings automatically? Thanks for your answers in advance. Can you recommend a source on this? I can give appect.com as an example site.
A possible solution is:
Provide DNS record * A 159.89.31.46 Thus all hosts with no explicit A record will be resolved to the IP address of your website.
2.In your web server configuration redirect requests to host username.appect.com to the approprate user's directory

Rename directory name using .htacess

It's hard to explain, I would like to do something like below but I don't know how.
I currently own two different domain names and have one website.
Can I have two domains pointing to the same website but the URL only shows whatever domain is entered in the first place?
For example, when I type in 'domain123.com', it takes me to my website (IP address 111.222.333) with the URL shown as 'domain123.com'. Then when I type in 'domainABC.com', it also takes me to the same website (IP address 111.222.333), but the URL needs to show 'domainABC.com' instead of 'domain123.com'.
I guess I will need to redirect one of the two domains to the website, but how can I stop the URL changes the domain name?
I am not sure if I can just modify .htaccess to achieve above or if I also need to change the DNS, etc. to make this work.
Please help and many thanks
It depends on your setup and your server permissions.
A nice way will be to change the docroot in the apache or nginx config.
If you don't have permissions to edit these configs, you can create a symbolic links so that the public folder of domain2 points to the public folder of domain1

Plesk Error - Failed domain creation - Serial Number update limit

I have an issue with my Plesk instance which really doesn't make sense to me.
I am creating a lot of subdomain for my clients on my main domain.
I don't handle any DNS on my server, service is disabled in Plesk and my 2 DNS servers for that main domain are my domain/vps provider ones (OVH).
I use then to create a subdomain as a zone DNS for each of my client in OVH backend, but know I chose to simply use a wildcard to avoid having 100s of entry.
Then I go to plesk and add a subdomain (vhost) with the associated folder where the subdomain (or domain) needs to go. It use to work fine but unfortunately now I have an error saying:
Error: Failed domain creation: Unable to update the domain data: The
serial number update limit was reached. No further change on the DNS
zone can be done today.
I really don't get it as, on my provider, I can create as many DNS zone as I want, and I really don't see the link between my server/Plesk vhosts/domains/subdomains and the DNS! I don't handle any DNS on my server and I thought creating a subdomain or domain on Plesk was just creating a vhost.
I am stuck on that one, would be great if any of you ever encounter that issue could help me.
PS: Couldn't find anything online ...
PS2: Called my provider and talked to me about SOA limitations, But again I can't see the link here. As the error is not when I try to create a DNS zone but when I try to set a new vhost.
This is a plesk bug know for me as PPPM-2590.
As workaround you can uncheck 'Use serial number format recommended by IETF and RIPE' on parent domain where you have a lot of subdomains or server-wide in 'Tools & Settings > DNS Templates > SOA record Template' and sync template with domains.
You can try this custom fix
Make sure that you have latest update #68
Backup original file:
cp /usr/local/psa/admin/plib/Dns/Zone/Abstract.php /usr/local/psa/admin/plib/Dns/Zone/Abstract.php.ORIG
Download https://docs.google.com/uc?authuser=0&id=0B7Nx66lufdvpSkxxeHpqaGtvWTg&export=download and place it to /usr/local/psa/admin/plib/Dns/Zone/Abstract.php

Domain name point to subdomain of a entire different domain

I am completely confused the last few days with this and I still haven't found an outcome that's worked.
Basically I have a domain name without hosting at letshost.ie which is dublinplasterer.ie
I also Have one domain & hosting with godaddy for domain- shanafagan.com which is my own site for web/graphic design service.
I created a subdomain= dublinplasterer.shanafagan.com and uploaded the site files.
Basically I want for example when someone types in dublinplasterer.ie in the address bar if goes to dublinplasterer.shanafagan.com but doesn't show dublinplasterer.shanafagan.com url, stays as dublinplasterer.ie
Im not even sure if this can be done at this stage. head is melted
shanafagan.com and the subdomain dublinplasterer.shanafagan.com have the same ip so how will that work if changing dns?
Any help would be greatly appreciated , am so stuck at this stage.
If you wanted to do it this way you would need a web server for domain2.com
Search for ProxyPass.
The way you should do this is add a second domain on your web hosting (cpanel for example) and point the other domain to this web server.
If you are struggling I recommend using a solution like cPanel that is widely used and simplifies much of the process. It is common enough you can google most issues.
So normally you would have started by making an add-on domain (instead of a subdomain) which would also create it's own subdomain anyway. To do that, you go to your cPanel in GoDaddy and find add-on domain, then make it "dublinplasterer.ie" (Don't add www. to it. Even though this name is hosted elsewhere, we will later go to your DNS files at that hosting and point it to your GoDaddy's name servers and this add-on helps it direct to the right root folder) then choose your local root folder for that site (I think you can actually make this the same as your other subfolder already hosting your files and then it will just pull the same site) or you can pick a different subfolder and then make the add-on domain. This tells any request to this name server that if it is a request for "dublinplasterer.ie" it needs to send it to the subfolder you specified.
If you don't make the subfolder the same as the one you already made, you can either load the same content into your new subfolder or create a CNAME record telling this add-on to point to your subfolder instead but that is more complex so go with the other route.
Lastly, you need to go to your original hosting at letshost.ie and under your domain name find the DNS records tab. Change the name servers to match your GoDaddy ones and now (may take a day or two to show as DNS changes often take days and can't be seen immediately but you can try using a different device/computer/mobile that hasn't loaded it previously to see if it will refresh the correct dns) it should work. Even though it points to your main site name servers, the add-on domain you made receives it and directs it to the subfolder you specified on the add-on domain.
Hope that helps, let me know if it works for you.

CNAME to an A - pointer To webpage

Is it possible to use a CNAME pointer, that points to an A pointer that points to the webapplication?
I've tried this multiple times now, without any success, and i start to think that it is not possible?!
i got this
"Bad request, invalid hostname" think its an 400 error.
If it is not possible to do it this way, can someone please give me some ideas how to start?
My web application:
I got a couple of users registered at my web application.
Each users is supposed to get an sub domain, for example, user1.mydomain.com (A-pointer to web.mydomain.com, where all the aspx filer are)
by reading the domainname I get the userID.
If this is not possible i have to put a lot of files in each domain, which i dont want to do. what would you do?
wildcards is not possible.
Why a cname to a A? i have to take into account that each user maybe want to point their domain to his or her account at my place. so their pointer should be a CNAME...
Thanks!
The problem is that your virtual hosts are not configured to accept requests for the domain the the CNAME record is for.
You need to set the ServerAlias directive (assuming you are using Apache) so it contains all possible variants that you want to use to access your app.
A CNAME record is simply an alias of an A record, so it will always resolve to the IP that the A record points to. What you need to do is tell your web server how to handle those domains (it's based on the Host: header of the HTTP request).
You will find that you have same problem if you create A records for your other subdomains, instead of CNAMEs.
If you need to dynamically add/remove users, you would probably want to use mod_vhost_alias so you don't have to restart Apache every time you do it.
EDIT Sorry, just noticed the reference to aspx, which presumably means you using IIS, which means I can't tell you exactly how to configure it since I know next to nothing about IIS. Re-tag this question with IIS and someone will probably be able to help :-)
ANOTHER EDIT This page from M$ may help you with IIS virtual hosting, although I still don't know how to do it dynamically/programmatically.

Resources