Indexing Of Public Folder

I am using Dreamweaver CS5 and some of the pages are in the public folder and ALL the pages are listed below that level. So some pages have two versions, with /public/ and without.

[noparse]www.widget.com/public/redwidget.html

www.widget.com/redwidget.html[/noparse]

Are both these pages indexed and producing duplicate content?

Is it possible to remove the pages that will appear if the url contains /public/?

Thanks.

There are a couple of options.

If you have access to .htaccess then put the following line in

RedirectMatch /public/(.*)$ http://www.widget.com/$1

That will visibly redirect users from the public URL to the root URL. Because it’s visible (unlike mod_rewrite), Google will see the changed URL and update its index.

The other thing to do is to put in the <head> of each page

<link rel="canonical" href="http://www.widget.com/rewidget.html">

That will tell Google you want it to use the specified URL for indexing that page, whatever URL it happens to be using at the moment.

Those two aren’t mutually exclusive - if you do both then you’ve got a better chance of Google updating its index quicker!

Off Topic:

When you’re using dummy URLs to explain the point, please don’t allow them to become clickable links. If they start with http:// or www. then you need to un-tick the “Automatically parse links in text” box. If you leave it ticked, we end up with a load of outbound links to dummy sites.