Cloudflare 'direct' subdomain shows main site on IP address - dns

At the moment I'm hosting several websites under the same IP address, all running perfectly fine. Now I've added Cloudflare in front of them and for all websites, the subdomain direct., points to the main website's main page.
Example setup of domain, if IP is 78.12.23.234:
masterdomain.com
otherdomain.com
somedomain.com
direct.masterdomain.com → Master Domain website
direct.otherdomain.com → Master Domain website
direct.somedomain.com → Master Domain website
I've tried adding an alias to the website in question, but no success.
Is there an error in my setup of domains or should i change something on the Cloudflare side?

It is only going to work against the root domain that is on us (masterdomain.com), if what I'm reading this correctly. That's what the A record is pointing to & what direct is working against (my assumption is the other sites are not on us individually).

Related

DNS not pointing to my website

I am very new to hosting. I have just got VPS with no prior experience (just a little bit working with in a shared hosting with Cpanel)
The VPS came with CentOS and Cpanel installed. So, I just needed to go through initial setup of WHM. I did not change any thing. Apparently, there name severs and an IP were already allocated to my host. I did not change them.
Right after Creating Cpanel for a website I already had somewhere else (and It was working), I went and changed the name servers of domain to names servers of my new host.
I know it can take up to 48 hrs for name servers to propagate through internet but it is close to 48hrs and I still have below situation
https://IP of my host -> new website shows up
http:// IP of my host -> websites doesn't show up(the gray sorry! page ....)
www.mywebsite.com -> websites doesn't show up (nothing at all)
I have already flushed my dns so it has nothing to do with cash
Observations:
I have checked with DNS checker websites. My dns name servers ARE propagated.
IP of name servers and my host IP is also returns positive.
just www.mydomain.com does not return result.
Should I wait more or there is something wrong with server configuration or do I need to reset something on server?
Thanks in advance
Make sure that you have a valid CNAME record set for www.yourdomain.com . If your non-www domain name works fine and the www doesn't , you should set a CNAME record for www.yourdomain.com to resolve to yourdomain.com .

domain poiting to website

I have a a website on my server on a subdomain. let's say at this adress:
subdomain.sourceserver.com/site/
I mapped a freshly bought domain (mynewdomain.com) to my server. So now mynewdomain.com resolves with the IP of my server.
And http://mynewdomain.com displays the website located at subdomain.source-server.com/site/
When I start browsing in the pages of the website, the adress displayed changes back to http://subdomain.sourceserver.com/site/blabla.php
I would like to keep it with the domain name:
http://mynewdomain.com/blabla.php
How can I do that ?
Do I have to create a CName on the DNS zone subdomain.sourceserver.com ?
Thanks in advance !
Cheers,
Mat
DNS is not what's changing the address in your browser, it is likely your web code or web server config. My suspicion is that your site is configured to be "subdomain.sourceserver.com/site/", so links inside the site are pointed at "http://subdomain.sourceserver.com/site/something.file", which is why the visible URL changes.
http://mynewdomain.com is resolving to the same IP address as your previous name, so your web browser is taking you to the same content. Unless you have virtual hosts configured so that the server pays attention to the headers, it will simply serve out the content to the request that lands on it's IP:port.
Virtual host examples

how to redirect all the domain extensions on the main site domain

I have many domains with different extensions, for example: website.com, website.net, website.org,...
the main site/domain is website.com where I have installed WORDPRESS
what I'm tring to do is to set all the others domain (website.net, website.org,..) to point on the main site/domain (website.com)
so, for example, if I go on "website.net" or "website.net/something" should I be redirect on website.com
I have cpanel so i guess that the first way is to add all the domains with the "addon domains" function, and then add in the wp-config.php:
define( 'NOBLOGREDIRECT', 'http://website.com' );
or another soluzion could probably be to simply park all the domains with cpanel function, or se the htaccess, but how?
what is the best solution in this case?
PS: the main website is in a subfolder (not root)
Just do a DNS forward and be done with it. Go to your DNS provider and just setup domain forwarding to your main domain name.
Forward website.net and website.org to website.com. When anyone goes to website.net it will redirect to website.com and same with .org. The domains will need to be parked.
If you host your DNS at a registrar like GoDaddy, then this will show you how.
http://support.godaddy.com/help/article/422/forwarding-or-masking-your-domain-name
Otherwise, the procedure is the same wherever your DNS is hosted. I suggest forwarding it without masking.

How to do a no-DNS site preview, when a wildcard redirect is in place

I'm looking to figure out how to replicate the functionality of GoDaddy's PreviewDNS when I'm moving a site to my own web host based in cpanel.
My setup is this: I have a wordpress multiuser site setup with a subdomain install, and a wildcard redirect.
I can't figure out how I can preview the website for an account before the DNS is switched over to my host from the old host.
I've been able to sorta do this by creating an A record of a subdomain over to my host, but I still have the issue of not being able to test the actual files instead of a copy in a subdomain.
I have two IP addresses attached to the server, one to the server itself and all the shared domains, and the other dedicated to the WP multisite.
When I go to http://ipaddress/~username/, I either get an error, or get redirected to the wordpress multisite's default "this site doesn't exist, sign up now to create it" page. I've tried this with both IP addresses with no avail.
Any ideas?
I think what you're trying to do is ensure that everything is working on the new server before having the DNS globally changed for all users? You could change your local computers hosts file to point the domain (and any subdomains you wish to test) over to the new dedicated IP address, which is essentially moving the DNS over for just yourself.
Here's a pretty good guide on how to do it: http://www.howtogeek.com/howto/27350/beginner-geek-how-to-edit-your-hosts-file/

How to redirect different sub domain requests to different servers

Under my domain, one of the subdomain must be directed to one server that hosts the relevant applications, and the rest must be directed to another server that hosts the relavant applications.
So, any requests to the url appa.example.com\* must be directed to one server, and any requests to the url appb.example.com\* must be directed to another server.
The issue now is how to configure the Apache configuration on both servers-- maybe using configuration like ProxyPass or ProxyPassReverse so that they all the incoming requests can be directed correctly at the correct server?
Edit to make the question clearer.
The place to link an url to an IP (server) is the DNS.
For example if server A is at 1.2.3.4 and server B at 5.6.7.8 you link appa.example.com to 1.2.3.4 and appb.example.com to 5.6.7.8.
But if both servers are behind a firewall (with a single external IP address) you have to perform some tricks. (And you are probably looking for these tricks).
Have a look at An Introduction to Redirecting URLs on an Apache Server.
I've done the same thing for my workplace (a University). Our primary website it hosted elsewhere but part of the site (student registration system) is hosted onsite.
What I did was to create a Authoritative (A) DNS Record (reg.domain.com) and made it point to the IP of our onsite server. And that did the trick!!!
Here's a screenshot of the same from my domain CP (domain and IP masked for obvious reasons)...
alt text http://img443.imageshack.us/img443/5069/stiuaregrecord.jpg
It's essentially the same as what you're trying to do. Give it a shot and see :)
In the DNS records/manager for the parent domain of the intended subdomain:
point the subdomain name at the to-be host servers IP address, then ...
... Then ...
In the host server DNS and or server-software config: direct the subdomain to the website app. You can achieve this by one of: -
manually edit the DNS records,
park the subdomain and point it at the website document root folder, or
add the domain and subdomain (domain will never be used since its not pointed at applicable server). Point them both at the document root for your now subdomained (if there is such a word) website app

Resources