corsasport.co.uk
 

Corsa Sport » Message Board » Off Day » Geek Day » DNS question


New Topic

New Poll
  Subscribe | Add to Favourites

You are not logged in and may not post or reply to messages. Please log in or create a new account or mail us about fixing an existing one - register@corsasport.co.uk

There are also many more features available when you are logged in such as private messages, buddy list, location services, post search and more.


Author DNS question
Bart
Member

Registered: 19th Aug 02
Location: Midsomer Norton, Bristol Avon
User status: Offline
28th Jun 12 at 14:21   View User's Profile U2U Member Reply With Quote

I have a domain, www.mydomain.co.uk

Id like to resolve an address: bart.mydomain.co.uk to forward to a directory, i.e www.mydomain.co.uk/bart

Is this possible? Ive tried cnames etc, but they dont appear to like "/"
Whittie
Member

Registered: 11th Aug 06
Location: North Wales Drives: BMW, Corsa & Fiat
User status: Offline
28th Jun 12 at 14:25   View User's Profile U2U Member Reply With Quote

Edit: I've just tried it and it worked fine, how are you doing it?

Edit 2: Actually what are you trying to achieve? Just a sub-domain?

http://bart.winablackberryplaybook.co.uk/ - Directory was public_html/bart/index.html.

Guessing you're trying to do something with your email, and not sub-domain?


[Edited on 28-06-2012 by Whittie]
VrsTurbo
Premium Member

Registered: 8th Jun 10
User status: Offline
28th Jun 12 at 14:36   View Garage View User's Profile U2U Member Reply With Quote

i can do it on 1and1
Bart
Member

Registered: 19th Aug 02
Location: Midsomer Norton, Bristol Avon
User status: Offline
28th Jun 12 at 14:36   View User's Profile U2U Member Reply With Quote

nothing to do with email, purely want to redirect traffic bart.mydomain.com to a directory on the website, www.mydomain.com/foldername

*edit* its deffo a CNAME yes?

The error I get is:

quote:

Sorry, there was a problem

Error: Only the characters . - a-z 0-9 are allowed in the right field



[Edited on 28-06-2012 by Bart]
VrsTurbo
Premium Member

Registered: 8th Jun 10
User status: Offline
28th Jun 12 at 14:37   View Garage View User's Profile U2U Member Reply With Quote

when i create a subdomain in my control panel i can specify where it directs to.
VrsTurbo
Premium Member

Registered: 8th Jun 10
User status: Offline
28th Jun 12 at 14:38   View Garage View User's Profile U2U Member Reply With Quote

cname wont go to folders thats direct to ip/names
Whittie
Member

Registered: 11th Aug 06
Location: North Wales Drives: BMW, Corsa & Fiat
User status: Offline
28th Jun 12 at 14:38   View User's Profile U2U Member Reply With Quote

That way technically creates a sub "Public html", so copy all your contents from your main public html folder, that you're wanting to display, to the newly created one. You may need to change the name first to avoid confusion

[Edited on 28-06-2012 by Whittie]
Bart
Member

Registered: 19th Aug 02
Location: Midsomer Norton, Bristol Avon
User status: Offline
28th Jun 12 at 14:38   View User's Profile U2U Member Reply With Quote

hmm.... i'll try subdomain rather than dns
VrsTurbo
Premium Member

Registered: 8th Jun 10
User status: Offline
28th Jun 12 at 14:41   View Garage View User's Profile U2U Member Reply With Quote

Cname separates it via IP on DNS.

Say you have a domain but have different IP range internally.

Mail.xyz.com CNAME PUBLICIP
xyz.com A DIFFERENTPUBLICIP


The subdomain all gets done via the host
Bart
Member

Registered: 19th Aug 02
Location: Midsomer Norton, Bristol Avon
User status: Offline
28th Jun 12 at 15:05   View User's Profile U2U Member Reply With Quote

ok thanks guys. Have setup a subdomain with a redirect to my address. I'll see how it goes

[Edited on 28-06-2012 by Bart]
Dom
Member

Registered: 13th Sep 03
User status: Offline
28th Jun 12 at 17:27   View User's Profile U2U Member Reply With Quote

quote:
Originally posted by VrsTurbo
Cname separates it via IP on DNS.

Say you have a domain but have different IP range internally.

Mail.xyz.com CNAME PUBLICIP
xyz.com A DIFFERENTPUBLICIP


The subdomain all gets done via the host


CNAME is just an alias of an A record hostname. A records for IPs, CNAME's for hostnames.
If you wanted to point 'Mail.xyz.com' to another IP range then you'd set it up on a A record.

In Bart's case, the subdomain would be a CNAME of the domains A record ie:
code:
mydomain.co.uk A (record) 1.1.1.1
bart.mydomain.co.uk CNAME mydomain.co.uk

(www.mydomain.co.uk would also be a CNAME of the domains primary A record)

What ever webserver Bart's using would handle the physical redirect to another directory.


Bart - if you're using cPanel (/DirectAdmin etc etc) and it's handling the DNS, then just set up a subdomain and point it to the required directory. It'll sort out the rest.
Bart
Member

Registered: 19th Aug 02
Location: Midsomer Norton, Bristol Avon
User status: Offline
29th Jun 12 at 08:14   View User's Profile U2U Member Reply With Quote

Dom,
Yes im using a cpanel, but only for the hosting, everything is handled by another party.
(i decided to move web hosting only as a test, actually like it and decided not to mess about with mail or other dns etc).

Ive spoken with the hosting company and been told It needs to be a dns entry on the main hosts who manage dns settings.

So any idea what settings to input?
ed
Member

Registered: 10th Sep 03
User status: Offline
29th Jun 12 at 08:55   View User's Profile U2U Member Reply With Quote

You wouldn't do this entirely with DNS would you? You'd use the following DNS settings:

A - * - 1.2.3.4
A - @ - 1.2.3.4
CNAME - www - @

That gives you the ability to wildcard subdomains and I guess the www CNAME isn't actually needed thinking about it. Alternatively you could get rid of the * A record and then declare all of your subdomains as CNAME's.

Your web server then handles the request, in Apache you'd need to edit your vhost.conf file to have something like this:

<VirtualHost *:80>
DocumentRoot /var/www/mydomain.co.uk/bart/
ServerName bart.mydomain.co.uk
</VirtualHost>
Dom
Member

Registered: 13th Sep 03
User status: Offline
29th Jun 12 at 09:53   View User's Profile U2U Member Reply With Quote

What Ed said

But as mentioned the DNS just points the domain to the server, the webserver handles the physical redirect (as you can see in Ed's Apache config example).

If your DNS is third-party then setup a CNAME with your domain as the hostname or set it up as an A record and point it to the IP of your server. Then under cPanel set up the subdomain (This Menu) with the document root being the directory you wanted it to redirect to.
cPanel will then handle configuring Apache.

[Edited on 29-06-2012 by Dom]

 
New Topic

New Poll

  Related Threads Author Forum Replies Views Last Post
Server 2003 help needed Melville Geek Day 15 1439
19th Feb 04 at 16:53
by Fester
 
Any Network/IT Admins out there? Houckham Geek Day 10 1257
19th Apr 04 at 12:57
by Trotty
 
SBS 2003 DNS problems! pow Geek Day 6 737
6th Feb 09 at 13:52
by pow
 
Software Day: I need help writing a tiny program pow Geek Day 28 1571
7th Oct 09 at 21:23
by jamied
 
DNS Config ed Geek Day 2 324
9th Jun 10 at 18:13
by ed
 

Corsa Sport » Message Board » Off Day » Geek Day » DNS question 29 database queries in 0.0136120 seconds