www resolve ?

Thanks to BigG for pointing me to ‘Woorank’ which analyses sites, I understand some of it (about 10%) but this is something I’d not come across:

"Be sure that http://lionhearttravel.com and http://www.lionhearttravel.com are not running in parallel.

Redirecting requests from a non-preferred hostname is important because search engines consider URLs with and without “www” as two different websites.

Once your preferred domain is set, use a 301 redirect for all traffic to your non-preferred domain."

Anyone able to explain this please - many thanks … Roger


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

A more compelling reason would be to make an automatic a 301 re-direct in a .htaccess file.

This would be to make sure anyone linking to your site is using your preferred URL which would help SEO.

David Owen { Freeway Friendly Web hosting and Domains }

http://www.ineedwebhosting.co.uk | http://www.PrintlineAdvertising.co.uk

On 14 Jan 2011, at 10:43, Roger Burton wrote:

"Be sure that http://lionhearttravel.com and http://www.lionhearttravel.com are not running in parallel.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thanks David, yet again I’m likely to be showing my ignorance here but I have ONE site I’ve published :

… where does the one without the www come from ?

Best Roger


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Ah I see I foolishly double posted - on the other post Jonathan Riddle kindly pointed me to an explanation and some code to solve the problem … very good thank you Jonathan … however can someone explain how I add this to the ‘site’ in Freeway is it ‘insert’ ‘markup item’ ? … and, as a matter of course, should I add it to all my other sites ?

Regards Roger


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Roger.

You have indeed double posted - but not to worry - it happens! I will respond further on this thread as that is where you have asked another question.

As David states, most search engines will tend to suss out which is preferred, especially if you register your site with Google Analytics and following their instructions for submitting a sitemap.xml file. I have a few sites online, and I haven’t had to specifically solve this problem because Google has worked it out for itself on all but one page - helped in all cases by sitemap.xml files.

However, doing the Google search as suggested in the link I gave on the other thread indicates your site is being indexed with and without www, so I would personally advise you create the necessary 301 redirect.

Although I am far from experienced in such things (as David will know!), I create mine in either a simple text editor or BBEdit. Following the instructions on that link I gave you, you will actually generate simple text files with the redirect coding on it, and save it with a name of .htaccess, and then upload that file separately via an ftp application such as CyberDuck, making sure it sits in the same folder as the index.html file. However, you may already have .htaccess files on your server, so be careful as you can only have one in each folder.

However, because files with a fullpoint in front of them are invisible to the system, I just save the file with the name htaccess (minus the fullpoint), upload that to the appropriate server via ftp, and then rename that file actually on the server by adding a fullpoint in front.

By the way, I can wholeheartedly recommend the hosting David provides, because it provides many and varied automated ways of doing things such as this.

HTH

Jonathan


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

You will find it impossible to save a file on your Mac with a leading
dot in the filename, unless you are using a programmer’s text editor
like BBEdit, TextWrangler, TextMate, etc. The Finder doesn’t let you
save a file with a leading dot, because that will make the file
invisible.

So to save yourself some heartache, save the file as htaccess.txt on
your Mac, set your FTP application to “Show Hidden Files”, and then
look in your server’s site root directory. See if there is an
existing .htaccess file there (you may see a whole shed-load of hidden
files, some hosting providers love to put the entire control panel and
log analysis software in your site root and just hide it from normal
view).

If you do see an .htaccess file already in your server’s directory,
click on it once and use your FTP application’s “Edit with…” command
to open it directly in your text editor. See if it already defines a
bunch of redirects or security realms or what have you. If it does,
then add your redirect directive to the end of that file, save it, and
test your server immediately. IF this addition causes pain, then
delete it and save again, and file a support ticket with your hosting
provider explaining what you need to do and asking them why your
server isn’t behaving.

Walter

On Jan 19, 2011, at 7:16 AM, Jonathan Riddle wrote:

and save it with a name of .htaccess, and then upload that file
separately via an ftp application such as CyberDuck, making sure it
sits in the same folder as the index.html file. However, you may
already have .htaccess files on your server, so be careful as you
can only have one in each folder.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I did try and cover that Walter, but of course you explained it far better, with the important addition of how to check if you have any invisible files on the server already.

I do it the way I described because it does mean you always have a copy on your Mac which you can quickly re-upload if things go wrong.

In any case, I would certainly make sure you copy any existing .htaccess files onto your Mac into a folder (they will of course be invisible, so call the folder something logical), and then open those files from within BBedit by going to File>Open Hidden…

This way, you can then save a duplicate of the file, but without the fullpoint if you wish!

However, because files with a fullpoint in front of them are invisible to the system, I just save the file with the name htaccess (minus the fullpoint), upload that to the appropriate server via ftp, and then rename that file actually on the server by adding a fullpoint in front.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Forgot to add – once you move it to your server, you can rename it
as .htaccess, but then only if you have Show Hidden Files on –
otherwise, you’ll rename it, and it will promptly disappear from the
list of files.

Walter

On Jan 19, 2011, at 8:27 AM, Walter Lee Davis wrote:

So to save yourself some heartache, save the file as htaccess.txt on
your Mac


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thanks again chaps for an enormous amount of help and advice which I will work my way through, - is it easy to explain how I got into this predicament, I’d just like to avoid it happening again ?

Roger


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I’ve also just spotted that Jonathan suggests David’s hosting, well I do get my hosting from David so I’ll check that out … maybe David can give me a hint ! - Roger


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Roger,

I normally create .htaccess directly on the server using Transmit (FTP client). Or you could use the file manager (browser FTP) in the hosting panel which will also create/show/edit any .htaccess files for you if you haven’t got a FTP client to hand.

David Owen { Freeway Friendly Web hosting and Domains }

http://www.ineedwebhosting.co.uk | http://www.PrintlineAdvertising.co.uk

On 19 Jan 2011, at 15:37, Roger Burton wrote:

I’ve also just spotted that Jonathan suggests David’s hosting, well I do get my hosting from David so I’ll check that out … maybe David can give me a hint ! - Roger


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I’m still struggling with this redirect business. I DID find a hidden .htaccess on my server. (Found it using Transmit.) It has some stuff in it, none of which I understand and have no intention of changing.

However, all I want to do, then, is ADD my 301 redirect so that “whitehallboca.com” redirects to www.whitehallboca.com.

I don’t understand precisely what I should write to make that happen.

I’m sorry if I just don’t understand this from the thread here, and would appreciate exactly what it is I should add to that existing file on the server.

Many thanks in advance.

Laura


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Maybe I should have shown what already exists in the server. Here it is:

-FrontPage-

IndexIgnore .htaccess /.?? *~ *# /HEADER /README /_vti

order deny,allow deny from all allow from all order deny,allow deny from all AuthName whitehallboca.com AuthUserFile /var/www/vhosts/whitehallboca.com/httpdocs/_vti_pvt/service.pwd AuthGroupFile /var/www/vhosts/whitehallboca.com/httpdocs/_vti_pvt/service.grp

freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Look through your existing .htaccess file for the words ‘RewriteEngine on’. if you see those, that’s fine, you can skip adding them again later.

Move to the bottom of the file, and paste in the following code:

RewriteEngine on
RewriteCond %{HTTP_HOST}   !^www.example.com [NC]
RewriteCond %{HTTP_HOST}   !^$
RewriteRule ^/?(.*)         http://www.example.com/$1 [L,R,NE]

Go through that code, and replace example.com with your own hostname.

Save the file (which should upload it automatically if you’re using Transmit) and try your browser. If you get a 500 error, delete that code from .htaccess and save. Then file a help desk ticket with your hosting provider, and tell them you need ModRewrite on your server, as well as AllowOverrides=all. One of those two will be the issue.

Walter


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

And by adding that code, it will make non-www requests automatically go to www requests?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

That’s the plan. I got this code from the official Apache docs. Apache mod_rewrite - Apache HTTP Server Version 2.2

Walter

On Feb 25, 2011, at 10:09 AM, LauraB wrote:

And by adding that code, it will make non-www requests automatically
go to www requests?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thanks, Walter. And one more question, if I may. I recently added an xml sitemap to the root level of my domain. Assuming all goes well with the htpaccess file, should I then update that xml sitemap, too?

In fact, is that something that should be updated every time I add or remove a page from the site? I do pretty fine within Freeway, but get really nervous about having to go outside of it and into the belly of the beast.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

The .htaccess file is categorically not a part of your site. Your
Apache configuration files make it impossible for anyone to navigate
to it or download it by any public (non-password) means. So when you
change your .htaccess file, the content of your xml index should not
be affected.

What you might need to do is look through there and see if there’s any
part where they define the hostname of your server, and if they call
it example.com rather than www.example.com, you should change that.
But the rest of your pages should be fine. I believe all of the URLs
inside an index xml file are relative, not absolute.

Walter

On Feb 25, 2011, at 10:25 AM, LauraB wrote:

Thanks, Walter. And one more question, if I may. I recently added an
xml sitemap to the root level of my domain. Assuming all goes well
with the htpaccess file, should I then update that xml sitemap, too?

In fact, is that something that should be updated every time I add
or remove a page from the site? I do pretty fine within Freeway, but
get really nervous about having to go outside of it and into the
belly of the beast.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thank you, Walter. I think I understand and I really appreciate your patience in helping me.

Laura


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options