How can I add a "second url" to my current one? - html

I'm creating a website, and I have some trouble configuring my domain. What I mean by that is, I have the domain (myurl.com). How can I make it so that the URL (example.myurl.com) redirects to myurl.com? It would be greatly appreciated.
(google sites)

It depends on your web server. If its apache, look into name based virtual host, ServerName and ServerAlias.
You also need to configure your DNS. You can also use a PTR or CNAME (canonical name) to point lets say www.mydomain.com to mydomain.com. You can add as many of these in DNS (Name Server) as you well please.

What you are looking for is called a sub-domain.
I couldn't tell you off hand how to set it up, but hopefully that helps you refine your google searches on the matter.

Related

How to connect a domain to XAMPP

Ok, so I have an ip that works, I bought a domain name as well, how do I configure it so that when I type the domain it points to the ip, I do not want some kind of masked url forwarding as I want you to be able to type for example /img/ and go to that directory.
Any help?
(Edit: Spelling)
May I know what's domain vendor you subscribe, like Godaddy?
You can add the A record which can point to your IP address.
Go to 'Manage DNS' and find existing A record or add an A record,
here is a reference guide like Godaddy:
https://hk.godaddy.com/help/a-19238?lang=en

Point a domain to my website

I have a domain name which i need to to point to a sub domain of my existing website. Both the domain name in question and website are held with the same host so i have CPanel for the website (which has its own domain name and is currently online. Note the host does not provide CPanel (or similar) for domain-names only (i.e. without hosting).
I have seen subdomains and addon domains but from the description in CPanel i cant figure which if either will do what i want ... or even Aliases.
How can i point the domain name to a sub-domain? if possible. I do not want the existing websites domain name to appear in the url when visiting the sub-domain pointed to by the new domain name.
Thanks.
Since you're using cPanel... https://documentation.cpanel.net/display/ALD/Setup+Edit+Domain+Forwarding
If you just deal with a registrar instead of a provider, typically you point '#.domain.com' to 'http://sub.domain.com' - where #.domain.com represents the direct name, domain.com.

Put Page Name before URL

I'm making a web application and i'm just wondering about the domain name. I want it like google does it where its like maps.google instead of google . com / maps
How do i do this when buying a domain?
These are called subdomains.
Any URL you buy can have any subdomain by adding a DNS record.
So if you buy example.com, you already have anything.example.com.
I suggest you read up on DNS a bit. This should get you started.
You can do it by creating subdomians via using your control panel
There are a few different levels of domain when it comes to DNS.
The first level is the top domain level. You cannot buy the top domain as they are the base of all domains and include the infamous .com or .org.
The second level is the one you can buy. You buy a domain related to a first level domain. So if you wanted akashkodesia.com you need to make sure it is available on the .com top domain and try to buy it.
Once you bought a domain, the subsequent levels are up to you. You can create whatever you want without asking anyone. Of course you have the restriction of the DNS protocol which is up to 255 characters total for your complete DNS name including dots.

Openshift domain shows instead of desired domain

I have the domain test.com(just as an example), which I have bought from namecheap. I have redirected the domain to http://app-test.rhcloud.com/. However, when entering test.com in my browser I still can see http://app-test.rhcloud.com/ in the browser instead of test.com. Any recommendation how to clean that up?
I appreciate your answer!
You need to use a cname for your application, not a redirect. A redirect just tells the browser, now go to this domain instead. Check out this blog article for the correct way to setup what you are trying to do: https://www.openshift.com/blogs/custom-url-names-for-your-paas-applications-host-forwarding-and-cnames-the-openshift-way

I want to point a sub-domain to a new domain address

I'm looking to point a new domain name to my website sub domain address.
So would all I do is buy the new domain name address and use httaccess to tell my site when the new domain name is entered to go to www.newdomain.mydomain.com. How might I go about doing that?
But I'm hoping to have the new domain name address still be shown when they are on my sub domain as this is for a festival I am helping with and they don't need to buy hosting for this short period.
Any help is appreciated.
One way to get the url to stay as the one a user typed in instead of showing up as your subdomain is to put the whole site in a frame that loads your subdomain inside of it. Some registrars will do this for you so you don't need to pay for extra hosting. If you go with this option, you don't really need a subdomain, though, as you could just put the new pages in a folder off of your main site since visitors won't see the address anyway.
A slightly more elegant solution would simply be to use virtual hosts, if your server has the capability. If you have your own server, they are not hard to set up. If you have a hosting package from a company like godaddy, the company website will often give instructions on how to do this. The idea is that the server will handle the responsibility of routing a query to a specific folder based on the url of the request. Then all you need to do is set up the folder. If you give more specifics about what your hosting setup is, it will be easier to give guidance in this respect.
To get your new domain name to point to your website you need to:
configure your domain name to point to your web site IP address
configure your web server to serve your website when it receives requests to that new domain name
The company from which you buy your new domain name will provide you with a web interface to configure your domain name and make it point to your IP address.
If you're managing your web server yourself, you will need to edit its configuration to add a new named virtualhost for your new domain name (virtualhost directives don't go into .htaccess files). If you're using a shared hosting company, they probably also provide a web interface to configure your web site, so that it accepts requests to your new domain name.