How can I point one domain to different websites - html

I have two pages built with two website builders. One with Wix.com, and the other using kickofflabs.com. I want to host both of the pages to my domain and hosting. I can only host one now, how can I host two? I used CNAME in pointing on of the websites.
Thanks in Advance!

The closest thing would be to create one or two subdomains, and point each one of those at the appropriate hosting. For instance, page1.domain.com would point to your wix.com page, and page2.domain.com would point to your kickofflabs.com page.
See this SO question: Subdomain on different host
To be honest, you'd probably be better off in the long run just using one website builder.

you should use an a record to point your domain to server. and you should config that server to receive that request

Related

How do classified sites use sub domains and make them work like a single Application?

I would like to create a classified ads site like craigslist and I want to use sub domains for each city, like craigslist does.
I’m wondering if anyone knows how they spread their site out on so many subdomains and still make it work like one big site and not hundreds of little ones.
Make sense? Any idea of a classified ads script that can do that?
Think Wordpress can do that?
Thanks in advance for your reply.
It's all about DNS. It can be done with a wildcard entry (*.craigslist.com) that points to a single website that decides the content to display based on the subdomain. The same thing can be done with a single A record for each subdomain in use. Which is probably what they do or else all requests to craigslist.com would go to the single IP--even the unsupported ones.
I find the best way to do it is to have a single A record for the server IP with a host name like "myserver.mydomain.com" and then add CNAME records for each subdomain redirecting to the "myserver" subdomain. This makes it so you don't have to change all the subdomain IP addresses if you move your server.
In any case, your server looks at the subdomain in the host header to determine the content to display.
Hope that helps.

Double Website Host

I have a website that is critical to keep online 100% of the time.
I have a decent host, but every once in a while even the best host can go down.
It is for this reason that I was wondering if there was a way to have your website "double-hosted".
I'm using c-Panel, but I'm haven't found anything in there that could help.
I know it'll be some mess with having to change the nameservers as well, so is there an easy way to quickly switch up nameservers, in case my first host should go down?
Thank you in advance.
When you use Wordpress, you can install another website on another Webhoster but use the same Database. Problem: Your ISP just can take one IP Adress for your website. When http://idontknow.com goes offline, the DNS Record have the IP from your http://idontknow.com server. Now you can change the IP adress when you see that your website goes down, but the changes can take up to 24 hours.
I think the best way is to use cliudflare. So you can redirect on your second page that use the same Database.
The struture is like this:
Server 1: Database
Server 2: Website 1 (Primary)
Server 3: Website 2 (Backup)
Now when cloudflare know that your server have no response it will be redirect to Server 3. When the Server is online again, it will be redirect to Server 2.
Greetz

Single database for many domains approach

Good morning.
I have to build a system (php/mysql) that run in a 20 domains for 20 different cities (for example). The system that run in this 20 domains is identical, the database too.
My issue is: I pretend to create a single database to serve this 20 domains, controlling the cities by something like city_id.
I wish to know if this is the best practice, or if the right way is create one database to each city/domain.
The domains are hosted in the same server, the core system is out of public_html directory.
/mysystem_classes
/public_html/city1.com
/public_html/city2.com
/public_html/city3.com
/public_html/city20.com
To serve images, css and js I will work with something like a CDN.
Normally you would setup just one virtual host, install your application there and let all the domains point to that software. Which domain points to which website is not specified on the server level, but on the application level in that case.
TYPO3 for example works like that when building multiple sites with one instance of TYPO3 and the used MySQL database. (using TypoScript or the backend configuration to define which domain belongs to which site-ID)
Wordpress has a multisite feature, which could be set up easily to use several subdomains. It uses one database and a single software instance but can deliver multiple blogs to different domains. (e.g. city1.example.org, city2.example.org). You will need to setup a wildcard domain (i.e. *.exqample.org) to let all possible subdomains point to the single vHost. This is similar to how the basic Wordpress.com-Blogs work. See: http://codex.wordpress.org/Create_A_Network
I believe you are looking for Mysql replication.

Subdomains on Windows Azure

I've got a Windows Azure project I'm working on. It has two web roles - one is a public-facing site, and the second is an administration site for my customer to make changes to the database etc.
I had expected to be able to use a subdomain for each role - so for example have mysite.com and admin.mysite.com (obviously CNAME-mapped to the .cloudapp.net DNS name). However it looks like Azure doesn't do this, and instead has one subdomain (mysite.com) with different ports for each web role. So, for example, I would have mysite.com:80 for the main public site, and mysite.com:8080 for the administration.
Is this correct? Is there no way I can have subdomains for particular web roles?
Thanks in advance
John
This is correct. You can, of course, respond to both subdomains in a single role. But multiple web roles in Windows Azure correspond to multiple ports on the same virtual IP address.

How to organise a php based website

I am putting my php /mysql website up and this is my scenario
The users are grouped into sites each site with their own unique database.
There will be about 40 users per site.
the two options I'm trying to decide between are
have a central website running the php and directing the users off to their own database
using sub domains for each user each with their own php in htdocs
I dont even know if 2 is possible/stupid but if it was, would it make any difference to performance as they're all being run by the same server. Any other ideas/ advice much appreciated as I want to organise it the best way from the start
At login, you won't know where to direct them as they haven't identified themselves yet. After login, you can easily customise it for them.
You could create two separate PHP login files, and give different links to each set of users, but a simple clean login page and then a customised front end after login seems the best way.
1 would definitely be the right idea, you only have one copy of the code to worry about and you don't waste disk space on extra copies of the same code.
You could use 1 with wildcard subdomains and use .htaccess to change the subdomain into a posted parameter. That way you get one copy of the script and subdomains all in one go.
One thought, why dont you use a single database with an extra 'accounts' table, this may simplify things!