Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

is a 301 redirect for Root Domain to www. really important?

Featured Replies

Hi All,

 

I was just having a play around with Hubspots website grader for one of my domains and it has told me that I should really be using a 301 redirect as search engines will favor my site more. Well actually the exact words it used were..

 

Search engines may think www.mydomain.org and mydomain.org are two different sites.You should set up a permanent redirect (technically called a "301 redirect") between these sites. Once you do that, you will get full search engine credit for your work on these sites.

 

Is this really Important as I have always just catered for mapping the two variations in my apache config by using www.myserver.org as the 'ServerName' and myserver.org as a 'ServerAlias'

 

Perhaps this is having an adverse affect on my rankings........

 

Rgds,

 

Dave

 

I always do a non www. redirect to the www. then do a redirect from the homepage to the root e.g. index.html / index.php > domain.co.uk.

 

Potentially you can have 4 websites on Google e.g http://domaain.co.uk, http://www.domain.co.uk, http://www.domain.co.uk/index.html & http://domain.co.uk/index.html

 

To do this create a new file called .htaccess (remember the dot) and upload the file to the root of the domain e.g. in the public_html file.

 

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^domain.co.uk [NC]
RewriteRule ^(.*)$ http://www.domain.co.uk/$1 [L,R=301]

RewriteRule index\.html http://www.domain.co.uk/ [NC,R]
</IfModule>

Edited by Faevilangel

  • Author

Thanks for your input, I will certainly try and make some changes and see if my traffic goes up... That's certainly something I've never considered until today.

 

I tend to favour putting my rewrite code in the site definition files though rather than htaccess if I can help it.

 

Ok got things working with

 

RewriteEngine On

RewriteRule ^xxx.co.uk/(.*)$ http://www.xxx.co.uk$1 [L,R=301]

 

All seems good, so will keep an eye on analytics now and see if theres any difference :-)

Edited by daveb

  • Jo 90 locked this topic
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.