Jump to content

Hi,

 

I'm not 100% sure if this is the right place to post, but correct me if i'm wrong.

 

I have a website, that isn't working without the www. in front of it. 

Now I know that i can fix this by setting up my .htaccess file, but the problem is that my hosting ISP doesn't make it possible to use the .htaccess in the free hosting packets (the one I use).

 

So i was wondering if there is any other way to fix this.

Link to comment
https://linustechtips.com/topic/39342-website-not-working-without-www/
Share on other sites

Link to post
Share on other sites

Who do you have your dns set up through?  www is a subdomain, you must point the www subdomain in your dns settings to the ip address your tld is point at.  To illustrate:

 

www = subdomain

irock = domain

.com = TLD

 

irock.com = a domain space

www.irock.com = a completely separate domain space

 

Each domain space must be given an IP.  So go check your DNS settings and have it set correctly to fix the problem.

01110100 01101000 01100101 00100000 01110001 01110101 01101001 01100101 01110100 01100101 01110010 00100000 01111001 01101111 01110101 00100000 01100010 01100101 01100011 01101111 01101101 01100101 00101100 00100000 01110100 01101000 01100101 00100000 01101101 01101111 01110010 01100101 00100000 01111001 01101111 01110101 00100000 01100001 01110010 01100101 00100000 01100001 01100010 01101100 01100101 00100000 01110100 01101111 00100000 01101000 01100101 01100001 01110010

 

Link to post
Share on other sites

I went and pulled this off my DNS registry to show you how I have my sandbox server website set up:

 

          A     --IP--
        TXT   google-site-verification=TEXT  
test    A     --IP--

tools  A     --IP--

www   A     --IP--

 

As you can see, I have my DNS pointing every subdomain to my server's IP.  Then depending on your server configuration (I own my own servers, so I just set it up in apache) you can use an .htaccess to change what folders subdomains go to.  Or if you want your www to go to the regular, you can use either php or an http redirect into whichever sub you want.  If you have any questions let me know and I'll walk you through how to set it all up.

01110100 01101000 01100101 00100000 01110001 01110101 01101001 01100101 01110100 01100101 01110010 00100000 01111001 01101111 01110101 00100000 01100010 01100101 01100011 01101111 01101101 01100101 00101100 00100000 01110100 01101000 01100101 00100000 01101101 01101111 01110010 01100101 00100000 01111001 01101111 01110101 00100000 01100001 01110010 01100101 00100000 01100001 01100010 01101100 01100101 00100000 01110100 01101111 00100000 01101000 01100101 01100001 01110010

 

Link to post
Share on other sites

As far as I know, that's not possible without .htaccess however I'll go have a look at something and have a definite response in a sec. 

 

Only if he is running IIS and doesn't have access to root.

 

As Flynn is saying above, if you have access to things like A or CNAME records you can do it.

 

You could also do it via shell through either telnet or SSH if your host allows it.

 

Sadly, without knowing your host or the control panel they provide I can't point you in a direction...

Link to post
Share on other sites

Thanks,

I just made a new DNS record (A), with the extension www. in front of it. 

 

 

It takes some time before I can test if it's working, so i keep updated.

 

btw: my domain name provider is www.hostnet.nl & hosting provider PCextreme.nl (both Dutch)   

Link to post
Share on other sites

I tried to make a  DNS record (A) with www, but after that I'm unable to reach the website at all. So I deleted it. 

Mabey it will help. Here is an overview of my DNS record. 

 

Recordname      | Type        |  value 

------------------    |---------     |-------------

adriaanse.it        |    A          |  (IP)

*.adriaanse.it      |    A          |  (IP)

www.adriaanse.it | Cname  | adriaanse.it

 

In about a month or 2 I'm switching to paid hosting so then I can use .htaccess file. But a temporary solution would be nice.  

Link to post
Share on other sites

Needs to be a CNAME (Alias) iirc. At least, that's what my current domain is set up as. Under record name, simply "www" should work. Remove the one with the wildcard.

 

You could probably leave it as Type A, but change the "*.domain.lt" to "www". Also, the first recordname may need to be "@".

 

All of this is based on my namecheap DNS records settings, so I'm not sure how much of it is applicable.

Interested in Linux, SteamOS and Open-source applications? Go here

Gaming Rig - CPU: i5 3570k @ Stock | GPU: EVGA Geforce 560Ti 448 Core Classified Ultra | RAM: Mushkin Enhanced Blackline 8GB DDR3 1600 | SSD: Crucial M4 128GB | HDD: 3TB Seagate Barracuda, 1TB WD Caviar Black, 1TB Seagate Barracuda | Case: Antec Lanboy Air | KB: Corsair Vengeance K70 Cherry MX Blue | Mouse: Corsair Vengeance M95 | Headset: Steelseries Siberia V2

 

 

Link to post
Share on other sites

Who is your domain registra, normally the @ symbol is just there to point to what ever the default A name is

Arch Linux on Samsung 840 EVO 120GB: Startup finished in 1.334s (kernel) + 224ms (userspace) = 1.559s | U mad windoze..?

Link to post
Share on other sites

my registrar is Hostnet.nl (but it's Dutch, so may not be easy to figure out for you)

 

here is a screenshot from the screen when you want to chance/add/remove a record. There doesn't change anything if you select an other type (expect from MX & SRV)

hostnet screen

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×