Www. & Non-www versions problem
-
I currently have both WWW and non-WWW versions of my site live on the web, and I want to be able to have all non-WWW to point to WWW.http://nile-cruises-4u.co.ukhttp://www.nile-cruises-4u.co.uk
I want just the WWW version of the site live.I'm wondering the best way to resolve this?Is it normally dealt with in the .htaccess file and I think, looks like this but I'm not sure:<code>RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ [http://www.](http://www.)%{HTTP_HOST}/$1 [R=301,L]</code>
-
Hi Colin,
Login to wordpress admin panel then go to setting -> General and in that change put
WordPress Address (URL) = http://www.nile-cruises-4u.co.uk/ and
Site Address (URL) = http://www.nile-cruises-4u.co.uk/
Hope this helps you...
-
Thanks to Sanket I've successfully managed to have the site show only www. and not the non-www. versions.
However I have a blog on the site and that still shows the non-www. version, for example:
http://nile-cruises-4u.co.uk/blog/makadi-palace-hotel-makadi-bay/
I wonder if anyone has come upon the same problem and what the solution might be?
Thanks,
Colin
-
Thank you very much Sanket.
That's so kind of you.
Colin
-
Hi Nile,I have made code for you... please this code in .httaccess fileRewriteEngine onRewriteRule ^([A-Za-z0-9-]+)/?$ index.cfm?id=$1 [L]Rewritecond %{http_host} ^nile-cruises-4u.co.uk/$ [nc]rewriterule ^(.*)$ http://www.nile-cruises-4u.co.uk/$1 [r=301,nc] RewriteRule ^index.cfm http://www.nile-cruises-4u.co.uk/ [L,R=301]
Hope this help you out.....
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Redirects & Authority when Updating Product Pages
Hi Quick question on SEO & product pages. We're changing suppliers, so discontinuing their range, adding new - but the products will be very similar - almost identical in some cases. I don't want to lose authority built up from current product pages, the only way to reuse these pages is to reuse SKUs - which we can't do. If I am redirecting these pages to new products which are similar, I know page authority will be passed - so is this the best option? Our links on the website will actually point to the final URL, rather than going through a redirect - if this is the case will it still pass authority? Thank you Becky
Intermediate & Advanced SEO | | BeckyKey0 -
301ing Pages & Moving Content To Many Other Domains
Recently started working with a large site that, for reasons way beyond organic search, wants to forward internal pages to a variety of external sites. Some of these external sites that would receive the content from the old site are owned, admin'd and/or hosted by the old site, most are not. All of the sites receiving content would be a better topic fit for that content than the original site. The process is not all at once, but gradual over time. No internal links on the old site to the old page or the new site/url would exist post content move and 301ing. The forwarding is mostly to help Google realize the host site of this content is not hosting duplicate content, but is the one true copy. Also, to pick up external links to the old pages for the new host site. It's a little like domain name change, but not really since the old site will continue to exist and the new sites are a variety of new/previously existing sites that may or may not share ownership/admin etc. In most cases, we won't be able to change any external link pointing to the original site and will just be 301ing the old url to the contents new home on another site. Since this is pretty unusual (like I wouldn't get up in the morning and choose to do this for the heck of it), here are my three questions: Is there any organic search risk to the old site or the sites receiving the old content/301 in this maneuver? Will the new sites pick up the link equity benefit on pages that had third party/followed links continuing to point to the old site but resolving via the 301 to this totally different domain? Any other considerations? Thanks! Best... Mike
Intermediate & Advanced SEO | | 945011 -
Product descriptions & Duplicate Content: between fears and reality
Hello everybody, I've been reading quite a lot recently about this topic and I would like to have your opinion about the following conclusion: ecommerce websites should have their own product descriptions if they can manage it (it will be beneficial for their SERPs rankings) but the ones who cannot won't be penalized by having the same product descriptions (or part of the same descriptions) IF it is only a "small" part of their content (user reviews, similar products, etc). What I mean is that among the signals that Google uses to guess which sites should be penalized or not, there is the ratio "quantity of duplicate content VS quantity of content in the page" : having 5-10 % of a page text corresponding to duplicate content might not be harmed while a page which has 50-75 % of a content page duplicated from an other site... what do you think? Can the "internal" duplicated content (for example 3 pages about the same product which is having 3 diferent colors -> 1 page per product color) be considered as "bad" as the "external" duplicated content (same product description on diferent sites) ? Thanks in advance for your opinions!
Intermediate & Advanced SEO | | Kuantokusta0 -
301 Redirection problems
A couple of days ago we did a restructure of our e-commerce site (wordpress + woocomerce) where some product categories needed to change names. I used Yoast SEO plugin to do 301 redirects in the .htaccess file.Today I noticed that we had two hits in the SERP on the phrase "dildos med vibrator". See the attached screenshot (first two results).One goes to http://www.oliverocheva.se/kategori/sexleksaker/dildos/dildos-med-vibrator/ which is the right URL. One goes to http://www.oliverocheva.se/kategori/sexleksaker/dildosdildos-med-vibrator-dildos-for-honom/ which is a corrupt URL that has never been in use. The old one we did a redirect from was /kategori/for-honom/dildos-for-honom/dildos-med-vibrator-dildos-for-honom/The command in the .htaccess file was: Redirect 301 /kategori/for-honom/dildos-for-honom/dildos-med-vibrator-dildos-for-honom/ http://www.oliverocheva.se/kategori/sexleksaker/dildos/dildos-med-vibratorWhat has happened here? Why does the 301 create entirely new URL:s in the SERP?Tz0TULT.png
Intermediate & Advanced SEO | | kisen0 -
Disavowal & Reconsideration request - Can I do one without the other?
I submitted a link disavowal file for a client a few weeks ago and before doing that I read up on how to properly use the tool. My understanding is that if you received a manual penalty then you need to submit a reconsideration request after cleaning up links. We didn't receive a penalty so I didn't submit one. I'm wondering if anyone has used the tool (not stemming from a penalty) and if you did or didn't submit a recon. request, and what the results were. I've read that if a site is hit algorithmically, then filing a recon request won't help. Should I just do it anyway? Would be great to hear from anyone who has gone through a similar situation.
Intermediate & Advanced SEO | | Vanessa120 -
Problem with SEO for my Image based website.
My website focuses on movie posters. I'm having a little debate on what is the best way to have images linked to. The current image location is stored like this: /movie-name/poster-1.jpg
Intermediate & Advanced SEO | | thedevilseeker
/movie-name/poster-2.jpg Is it best to leave it like that or change it to : /movie-name/movie-name-poster-1.jpg
/movie-name/movie-name-poster-1.jpg The reason I ask, is that I read today that Google uses the image name to help detect what the image is about. At the same time, if the movie name is the in folder structure, along with the image name... wouldn't it start to look like keyword stuffing?0 -
Open Site Explorer not Seeing 301 Redirect to non-www
I cannot figure out why open site explorer doesn't see that when you go to http://preferredroofingkc.net/ it redirects to http://www.preferredroofingkc.net/ This is a wordpress installation that uses a cannonical url http://www.preferredroofingkc.net/ The HTACCESS file also has a 301 redirect as follows: RewriteEngine On
Intermediate & Advanced SEO | | RobertFisher
RewriteBase /
RewriteCond %{HTTP_HOST} ^preferredroofingkc.net [NC]
RewriteRule ^(.*)$ http://www.preferredroofingkc.net/$1 [L,R=301] But, open site explorer still shows these sites separately without alerting that there is a 301 redirect.0 -
Duplicate Content, Campaign Explorer & Rel Canonical
Google Advises to use Rel Canonical URL's to advise them which page with similiar information is more relevant. You are supposed to put a rel canonical on the non-preferred pages to point back to the desired page. How do you handle this with a product catalog using ajax, where the additional pages do not exist? An example would be: <colgroup><col width="470"></colgroup>
Intermediate & Advanced SEO | | eric_since1910.com
| .com/productcategory.aspx?page=1 /productcategory.aspx?page=2 /productcategory.aspx?page=3 /productcategory.aspx?page=4 The page=1,2,3 and 4 do not physically exist, they are simply referencing additional products I have rel canonical urls' on the main page www.examplesite.com/productcategory.aspx, but I am not 100% sure this is correct or how else it could be handled. Any Ideas Pro mozzers? |0