Koozali.org: home of the SME Server

Web page without "www."

mien

Web page without "www."
« on: May 16, 2006, 12:43:06 PM »
Just installed SME-Server, and I can open the front web page from the link http://www.myname.dk, but I cannot do the same from the link http://myname.dk (without the "www.").

How to fix this? I want to have a "short" url to my home page.

Is this something to be configured in the SME-Server, or perhaps some Apache config? Or is it something about the setting of my DNS provider?

Thanks for helping.  :-)

Offline crazybob

  • ****
  • 894
  • +0/-0
    • Stalzer R&D
Web page without "www."
« Reply #1 on: May 16, 2006, 02:00:09 PM »
This has to do with how you are set up with your dns provider. with the provider I use, the domain name "mydomain.com" is a "A" record, and "www" is a "C" record that points to the "A" record.


Bob
If you think you know whats going on, you obviously have no idea whats going on!

mien

Web page without "www."
« Reply #2 on: May 16, 2006, 03:03:25 PM »
See below the settings of the DNS...
Acctually, I see both "englert.dk" and "www.englert.dk" defined as "A" record, so why does it not work using just englert.dk ???

I asked the DNS manager on how to get it work and the answer was:
quote:
You have to create a multihost / redirect on your webserver.
unquote.
It sound greek to me, can you explain this? what does he mean I must do?

My DNS settings:

englert.dk.            21600   IN   SOA   ns14.inet.tele.dk. hostmaster.tele.dk. (
   2006051501   ;serial number (version)
   14400   ;slave refresh period (4 hours)
   7200   ;slave retry interval (2 hours)
   604800   ;slave expire time (1 week)
   900   ;negative response TTL (15 minutes)
   )
englert.dk.            21600   IN   NS   ns14.inet.tele.dk.
englert.dk.            21600   IN   NS   ns15.inet.tele.dk.
englert.dk.            21600   IN   MX   10 mail.englert.dk.
englert.dk.            21600   IN   MX   20 backup-mx.post.tele.dk.
englert.dk.            21600   IN   A   87.50.78.198
mail.englert.dk.       21600   IN   A   87.50.78.198
www.englert.dk.        21600   IN   A   87.50.78.198
englert.dk.            21600   IN   SOA   ns14.inet.tele.dk. hostmaster.tele.dk. (
   2006051501   ;serial number (version)
   14400   ;slave refresh period (4 hours)
   7200   ;slave retry interval (2 hours)
   604800   ;slave expire time (1 week)
   900   ;negative response TTL (15 minutes)
   )

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Web page without "www."
« Reply #3 on: May 16, 2006, 08:31:53 PM »
Quote from: "mien"
Just installed SME-Server, and I can open the front web page from the link http://www.myname.dk, but I cannot do the same from the link http://myname.dk (without the "www.").


Both go to the same page for me. As they should, as long as DNS is configured correctly.

mien

Web page without "www."
« Reply #4 on: May 17, 2006, 12:11:08 PM »
I got my DNS manager to configure in that way:

>the domain name "mydomain.com" is a "A" record, and "www" is a "C" record that points to the "A" record.

But no result (for now). Of course, I know that the settings may take some time to propagate, to be active... So I'll try later again and again...

The funny thing is that I tried to put temporary my Mac as web server instead of the SME, and as a result, it worked fine: both URLs, with and without the "www." openened the page on my Mac. This makes me think that this problem may be fixed somehow on the server side...

Beside of that I tried to take an aditional domain name (at dyndns) and enable the "wildcard" function. And this works too! So this makes me think that the problem can be solved in the DNS side as well...

Offline Smitro

  • *
  • 349
  • +0/-0
Web page without "www."
« Reply #5 on: May 28, 2006, 11:31:17 AM »
I could be wrong... but I think what you are after is an A Record of:
@.yourdomain.com -> your_ip

This is the wildcard I use works a treat.
.........

Offline jongkees

  • *
  • 23
  • +0/-0
    • http://www.fringel.com
Web page without "www."
« Reply #6 on: May 28, 2006, 01:14:18 PM »
Just a thought.
You did not accidentally entered 'www.domainname.com' when first configuring your server.
Take a look at Hostnames and addresses in the server-manager. in the hostname column does it say www.domainname.com or www.www.domainname.com?
Greetingz, Robert

mien

Web page without "www."
« Reply #7 on: May 29, 2006, 08:41:16 AM »
The problem is still not solved.

> @.yourdomain.com -> your_ip
Well... I have tried some different settings, but I have to do it throug my DNS provider every time. So now I took a book about DNS and found a chapter that explains how to do this... but... according to the book, the DNS settings should just work... So there is still a problem somewhere. I will soon learn how to do DNS settings from scrach...

> You did not accidentally entered 'www.domainname.com' when first configuring your server.
No, no. I didn't, but this could have been a funny reason...

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Web page without "www."
« Reply #8 on: May 29, 2006, 05:05:19 PM »
Quote from: "mien"

... according to the book, the DNS settings should just work...
/quote]

And they do. Both http://englert.dk/ and http://www.englert.dk/ get to the same (Primary) i-bay on your server (as best I can tell). Is that not what you want?

Offline Smitro

  • *
  • 349
  • +0/-0
Web page without "www."
« Reply #9 on: May 30, 2006, 10:57:06 AM »
yeah dude, it works from here... what's up?
.........

mien

Web page without "www."
« Reply #10 on: May 30, 2006, 11:36:25 AM »
> yeah dude, it works from here... what's up?
Now THIS is strange !!!!
Acctually, it also works from my LAN (always did).
But I cannot open the page via http://englert.dk (without the ".www") from my work (that is from the internet). I also have a second (old) connection to the Internet I used to test if this works from outside my LAN. In both cases it doesn't work trying to open http://englert.dk tells me:
"The page cannot be displayed" ... "Cannot find server or DNS Error" ...

So if both of you CharlieBrady and Smitro opened my test home page by using url http://englert.dk , then I am VERRRRY happy to hear that  :-D

The problem could simply be really local to my PC (I use the same PC home and at work, I experimented all this only from this PC). I will investigate this possibility. But if it is the case, then I don't care of my PC, and consider the problem as solved.

mien

Web page without "www."
« Reply #11 on: May 30, 2006, 12:04:02 PM »
:-D  :-)  :lol:  8-)  :pint:  :hammer:  ;-)  :-)  :-D
YES, Yes, it works! the problem is solved !!!

The problem was a local one, on my PC.

Thank you for all you who helped my to solve the problem. I own you all a big danish cake! please choose:
http://laglace.dk/uk/

Details: A long time ago, long before my DNS name firewall was set correctly, I got a tip from a friend of mine about how to access my server already by typing "englert.dk", instead of the local ip-address, and this, in order to be able to check links between the web pages on my server. This tip was: "just put an entry for englert.dk pointing to 192.168.1.2 in the file WINDOWS\System32\drivers\etc\hosts". And that's it! this entry was still here! so accessing the server by using the "short" url worked fine from the LAN, but not when not connected dirrectly to the lan (that is via the router). So I just commented out this entry, and the problem is solved!