Point DNS for domain name to subfolder - .htaccess

I'm sure this has been asked a few times, but I can't seem to find an answer. I am hosting a website on Godaddy. I have another account that is hosting the domain.
On the hosting account we have a dedicated IP with a few subfolders. Is there any way to point the DNS to an actual folder? Can I do this with any domain?

You need to point domain name to your dedicated IP, but then you can change the web-server configuration to redirect all domain traffic to one specific sub-folder.
Read virtual hosting with apache sever :
https://httpd.apache.org/docs/2.4/vhosts/examples.html

Step 1
Log in to your GoDaddy account and go to the "My Account" page.
Step 2
Click on "Hosting" on the left side of the page under "My Products," then click on "Manage Account" and choose "Domain Management" under "Settings."
Step 3
Click "Add Domain." Enter the new domain name in the field marked "Domain," and enter the sub-folder that will contain the site in the "Folder" field. Click "OK" to complete the process.

Related

How to prevent website access by server IP address on IIS server?

Recently our application scanned and found that application should not be accessible from server IP address only should Accessible through domain name
please tell me if anyone have make this work
For starters, your preferred approach is not necessarily more secure than the one you wish to prevent. Just saying.
You can accomplish your objective by configuring the default site as blank site (or whatever permissions or response you want).
To do this, on your IIS,
Move your content to a different folder (like c:\Inetpub\wwwroot\MySite)
Create a new site (IIS manager, right click "Sites". Add website")
Settings: "Physical path" points to your new content location (c:\inetpub\wwwroot\mysite), "IP address" is unassigned, "Host name" is the url for your site.
In IIS, right click "Default Web Site". "Edit Bindings". For any of the entries with "IP address" of "*", Edit, and remove the host name.
This will force anyone going to your site with the IP, but not a correct hostname, to go to your default site, which will be empty.

DNS! Use Bluehost domain with Azure

How can I use my existing Bluehost Domain with Azure? I have done creating a CNAME and A record on bluehost but when I try to visit my site the address i am seeing is the mysite.azurewebsites.net and not mysite.com has anyone tried this before ? hope anyone could help thanks in advance.
As Wayne said, you need to configure custom DNS name to your Azure Web App.
In the left navigation of the app page in the Azure portal, select Custom domains.
Create a CNAME record:
Select "Add hostname", fill your website name + domain name into Hostname and choose "CNAME", finally click "Add hostname". You will be able to browse your hostname in Explorer.
Create the A record:
Select "Add hostname", fill your website name + domain name into Hostname and choose "A record", finally click "Add hostname". You will be able to browse your hostname in Explorer.
For more detail, you could refer to this article.

How to create custom wildcard domain with Microsoft's domain (azurewebsites.net)

I refer follwing link :-
https://learn.microsoft.com/en-us/azure/app-service-web/web-sites-custom-domain-name#a
but When I am going to create custom domain it show following error.
No CNAME were found. Please add a CNAME record pointing to dev-demo.azurewebsites.net.
Please help me
Thanks.
According to the error message, what you need to do is set up a CNAME record to pointing to your Azure app's default domain for your domain registered at your domain registrar's own management tool (e.g. Azure DNS, GoDaddy, etc.).
If you registered your domain name with GoDaddy, please follow the steps blow.
Log in to your GoDaddy account.
Click on your account icon, then navigate to Manage My Domains.
Select the domain you want to manage, under the Action section, click on the Manage DNS button:
At the Records section, click Add and select CNAME from the drop-down list.
Complete the fields, then click Save button.
Now, go back to the Azure portal, and validate your hostname again.

Direct 1and1 domain to Azure site

In the past I have been able to just change the nameservers, wait a short while and then create an addon domain on my hosting.
However this doesnt appear to be how Azure works. I keep reading I have to create a CNAME. 1and1 only allows CNAME's on subdomains. I have done this and I have xxx.mysite.org successfully pointed at mysite.azurewebsites.net.
Without using a HTTP redirect can I get mysite.org pointing at mysite.azurewebsites.net?
Thanks!
After days trying to tackle this and reading endless articles online, I finally found the solution. I found numerous articles on mapping and configuring custom domains with azure including getting Error 404 - Website not found after configuring azure (which I also faced) but lacked the detailed configuration with 1and1 which was the main issue.
Some of the top-level articles I've been through I've listed below.
Map Custom domain to Azure App
https://learn.microsoft.com/en-us/azure/app-service-web/web-sites-custom-domain-name
Configure custom domain to azure app
Configuring custom domain for Azure Web App
https://learn.microsoft.com/en-us/azure/cloud-services/cloud-services-custom-domain-name -- Refers to Cloud Service and/or Web App
Error 404 - Web Site not found - Azure web site
https://social.msdn.microsoft.com/Forums/azure/en-US/c7974e51-8022-47cb-9a8c-ff7643966dc3/error-404-web-site-not-found-azure-web-site?forum=windowsazurewebsitespreview
Solution
1and1 Domain Configuration
Go to 1and1 control panel > Domains > Edit DNS Settings.
In Edit DNS Settings, the Name Server Settings should remain 1 & 1 name server.
In A/AAAA and CNAME Records section, select 'Other IP Address' and enter the IP which is assigned to you azure web app, you can find this through accessing your web app and going to 'Custom Domains'.
Add a TXT record with the value being yourappname.azurewebsites.net and click save.
Create a sub domain in 1and1 portal called awverify.mydomain.extension (where extension is your domain extension .i.e .com/.net/.co.uk), click Save
After you create your sub domain, go back to the domain section and next to your domain name click on 'Manage Sub Domain (for that domain)'
Expand the Sub Domain you created and click on 'Edit DNS Settings'.
In the 'Edit DNS Settings' on the A/AAAA and CNAME Records section, select 'Other IP Address' and insert the same app IP Address in the IPv4 text box and click Save.
Go back to your Main 'Manage Domain' section in 1and1 and repeat steps 5, 6, 7 and 8 only this time, your sub domain should be www.yourdomain.yourextension and in step 8 the additional configuration is that you add a TXT record, the value of your TXT record should be yourappname.azurewebsites.net.
After you have finished with the 1and1 configuration, it is strongly advised to wait at least between 12-48 hours to allow the propagation to complete before trying to validate your app in azure, in some cases this might work after a couple of hours.
Then configure Azure to recognise your domain.
Azure Web App Configuration
Go to your app > Custom Domain > Add Hostname
In hostname text box, type yourdomain.yourextension and click validate, on successful validation click 'Add Hostname'
Repeat step 2 to add www.yourdomain.yourextension.
Hope this helps.
You don't have to use a CNAME to use a custom domain with your Azure website. You can use an A record instead.
When you go to "Manage custom domains" in the Azure portal for your site, at the bottom of the window (underneath the CNAME instructions and list of domains) is the IP address to use to configure the A record.
You can use this to configure the DNS for your bare domain, to point it to Azure.
This is how I did it.
In your 1and1 account create a subdomain for your domain awverify.yourdomain.com
Go to DNS settings of this subdomain and under the A/AAAA and CNAME Records section, there will be radiobox for the CNAME, select this option and type in awverify.yourdomain.azurewebsites.net (this could be found in the Bring External Domains window in your azure portal)
When you save your changes here, it might notify you an error, just wait for a few seconds or minutes then click save button again to save your changes.
After successfully saving the subdomain DNS settings, go to the DNS settings of your domain, now under A/AAAA and CNAME Records section, select Other IP Address and in the IPv4 Address text field, type in the IP address you will see under Bring External Domains in your Azure portal. Save your changes.
In your Azure portal, under Bring External Domains, type in your 1and1 domain, wait for to verify, you should see a green check mark at the right side of the text box.

external domain to godaddy ultimate shared hosting

i have provided the following details to a domain registrar , my shared hosting account ip address, and the main domain's two DNS records which i copied from dns manager. i have added the domain in the hosted domains section and assigned a folder with a blank page in it. the domain is www.mahala.co.zw . i have gone to domaintools.com and looked up the domain and it shows its registered and returns the correct DNS records but when i visit the site it does not resolve. is there anything i missed on the godaddy side before i go back to the registrar. Please help
The best way to add an external domain to GoDaddy Ultimate Hosting is as so:
Add the domain manually in the domain section of your hosting. There is a section where it says "add external domain"
Wait about 2 hours and your domain will show as part of your domain list
Click the domain and go to the bottom of the page and then copy the now self generated DNS records (2 of them)
Apply these to the place you bought your domain (pointing your domain to these DNS records)
Go to your GoDaddy hosting, log in to the hosting account you want to use, go to hosted domains, and it should auto fill when you add the new domain name to the the list
You are done ! Good luck, God speed because GoDaddy is the worst when it comes to this process; I guarantee you none of their support section notes have such a step by step remotely close to this one I have written.

Resources