Domain name will not work without "WWW"

Lapan

New member
Joined
Apr 23, 2014
Messages
6
Points
0
Who read my other thread knew that I've had problems with hosting.
Well, its solved, at least I can add domain name now.
But, I have problem with accessing domain, so I openned this new thread.

Without "www" it will not work.
Maybe it needs time, I don't know, so I ask.


Here are settings for newly added domain.
Code:
<VirtualHost xxx.xx.xx.xxx:xx>
ServerAdmin  [email protected]
DocumentRoot /hsphere/local/home/user/lapan.com.ba
ServerName   lapan.com.ba


ServerAlias dxxxxxxx.uxxx.com.ba www .lapan.com.ba

Use UserGroup user user


Use php 5
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
ScriptAlias /cgi-bin	"/hsphere/local/home/user/lapan.com.ba/cgi-bin"



<DIRECTORY /hsphere/local/home/user/lapan.com.ba>
OPTIONS  Indexes ExecCGI FollowSymLinks
AllowOverride All
</DIRECTORY>
IndexOptions FancyIndexing
</VirtualHost>
Two A records:
*.lapan.com.ba - data: myipadress
lapan.com.ba - data: myipadress

Is this configuration right, and do I have to only wait for DNS to update?

Note: There is no space between www and full stop in www .lapan.com.ba
 
Last edited:

Jack London

New member
Joined
Jul 9, 2012
Messages
386
Points
0
Using htaccess to redirect non-www urls to www
Code:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^your-domain\.com [NC]
RewriteRule (.*) http://www.your-domain.com/$1 [R=301,L]
Now when you enter yourdomain.com and all pages in your domain.com then it will redirect to www.domain .com automatically.
Hope it helps!
 

Lapan

New member
Joined
Apr 23, 2014
Messages
6
Points
0
Seriously, is my hosting making me a fool?
How come video.lapan.com.ba working, and lapan.com.ba does not without www prefix?

:blink:
 

Warren76

New member
Joined
Jun 7, 2014
Messages
38
Points
0
Typically, the webmaster's control console should have a setting to allow traffic to automatically be directed to your name without using the "www." prefix.
 
Last edited:

hipcat

Moderator
Staff member
Joined
Jun 14, 2013
Messages
1,223
Points
113
It used to be that "www" redirection was a huge issue years ago, but most good hosts these days will automatically redirect visitors to your root domain, no matter whether they type www or not, unless you specifically setup a subdomain called "www".
 

NicholasK

New member
Joined
Jun 8, 2014
Messages
50
Points
0
You can also set prefix redirect from WordPress general settings.
 
Older threads
Replies
8
Views
4,181
Replies
12
Views
5,906
Replies
2
Views
2,387
Replies
4
Views
3,099
Replies
6
Views
6,434
Newer threads
Replies
17
Views
6,689
Replies
0
Views
2,247
Replies
2
Views
3,153
Replies
35
Views
13,999
Latest threads
Replies
0
Views
590
Replies
2
Views
790

Referral contests

Referral link for :

Sponsors

Popular tags

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top