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
-
How to determine if there are any back links still out there for my version 1 URL
My version 1 url was 301 redirected to version 2, years ago. If the version 1 is no longer contributing any SEO juice I would like to cancel that cancel that domain. Is there a way to know if the version 1 url still has any impact on SEO?
Intermediate & Advanced SEO | | PhotoStl0 -
AMP - The what, why and how of it
Hi There, In our company, we never had AMP implemented on sites that we SEO for. We want to start doing that now. I know the basics of AMP and their requirements, however, I need to know a lot more about it from an SEO perspective of this before I actually get developers onto it. I want to know all the 1) risks involved, 2) the best ways to implement it (plugin etc.), 3) why it is worth it. I also want to know how to see if a developer knows what he is talking about - and really will do it the right way without messing me up? Are there any specific questions I should ask, or information he should be aware of? Also, is there a way for it it be done for pages that have more than just text like quote forms, sliding headers etc.? Should we only do it for the blog section of our site? I would greatly appreciate any links to additional resources on this topic, (not why to use AMP, but everything else) I greatly appreciate you taking the time to answer my question
Intermediate & Advanced SEO | | Ruchy0 -
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 -
Keyword rich internal linking - problem?
Had an interesting situation today.. We write daily news articles on our site. In each article we link out to two sources that we are writing about (credible sources) and we do one or two internal links. For example.. 'Today McDonald's have announced that they are purchasing more blue widgets in order to increase their opportunity to appeal to a larger market.' So in that sentence you can see one outbound link and one inbound to blue widgets on our site. I got an email today from a large company who we have written an article about in the industry and they have asked me to remove the link to their site.. I actually asked them why and this was their response. 'We're concerned because of the number of keyword-rich internal links in the article, and are worried that being included alongside them might be misinterpreted by Google as an artificial link.' Fristly, do they really have anything to be worried about?.. but more importantly, with our internal linking, do we have anything to be worried about?.
Intermediate & Advanced SEO | | nick-name1230 -
Urgent problem - multilingual website title tag and meta description problem
Hello, Our client websites was ranking in high position in Google for a handful of keywords. Targeted keywords were in the title tag but for some reasons Google is not showing thouse keywords in title tag anymore. Instead Google shows same keywords in different language. I think there are some multilingual title tag problem. Any ideas how to solve it? Thanks guys
Intermediate & Advanced SEO | | serp-eesti0 -
302 Redirect of www. version of a site - Pros/Cons
Hi, I am considering making the 301 redirect from the domain to a 302 temporary redirect. Currently if a user lands on "www" version of the site, they are redirected to the non "www" version. But after the redirect, they will land on an external webpage (so if a user lands on the "www" version, they are redirected to a different website, not related to my domain). Reason I'm considering this is because I have received a large number of spammy backlinks on the "www" version of the site (negative seo). So I'm hoping that the temporary redirect will help me recover. Your thoughts on this: 1. Is this the best way to do a 302 redirect (redirecting the www version to an external domain)? 2. Will the redirect help the main domain recover, considering all spammy backlinks are pointing to the www version? 3. What are the pros/cons, if any? Thanks in advance for your thoughts! Howard
Intermediate & Advanced SEO | | howardd0 -
What to do with non-existing products (removed products)?
Hello, I'm selling unique products - only one of a kind of each product.
Intermediate & Advanced SEO | | BeytzNet
This means that whenever a product is sold, it is removed from display. In order not to upset Google by keep removing indexed pages I created a "sold items" page which links to all of the removed products. The problem is (or maybe it's not a problem) is that I got to the point where I have more "sold items" then existing items (and the list keeps adding up). What should I do with the non-existing items?
Was I correct? ---------------------------------------- ADDED INFO --------- The way the site is built is that I have main category pages and each of them is showing a large amount of products. Most of these products got indexed by Google. Each product has its own unique URL (Products do not return...) Once a product is sold it does not come up in the product categories - I only have a general "sold items" in the footer that shows all of them (with a lot of pagination). Since the products are rapidly changing, i thought it would upset Google to have a hundred 301 redirects in each week or two. Since the products are very similar to one another (only different measurements / colors etc.), I thought of having a link from a sold Item to a similar available item so if Google will direct someone it will probably be to the available product. The problem is that the sold items are now 4 times more than the number of available items... I don't think that a store should display 2008's t-shirts on 2012... Another problem that may rise with so many products is that I'm afraid that the one type of product that is being sold much more often will take charge at the end on the entire site since I will end up with 8,000 sold items of this product, 1000 sold items of other products and 1000 available misc products... this might also start causing duplication problems as the products are quite similar. Should I stop with the "Sold" products and use 301's? Thanks0 -
How to Resolve Duplication of HTTPS & HTPP URLs?
Right now, I am working on eCommerce website. [Lamps Lighting and More] I can find out both URLs in website as follow. HTTP Version: http://www.lampslightingandmore.com/ HTTPS Version: https://www.lampslightingandmore.com/ I have check one of my competitor who has implemented following canonical on both pages. Please, view source code for both URLs. http://www.wayfair.com ** https://www.wayfair.com** Then, I checked similar thing in SEOmoz website. 🙂 Why should I not check in SEOmoz because, They are providing best SEO information so may be using best practice to deal with HTTPS & HTTP. LOL I tried to load following URL so it redirect to home page. https://www.seomoz.org is redirecting to http://www.seomoz.org But, following URL is not redirecting any where as well as not set canonical over there. https://www.seomoz.org/users/settings I can find out following code on http://www.seomoz.org/robots.txt **User-agent: *** ** Disallow: /api/user?*** So, I am quite confuse to solve issue. Which one is best 301 redirect or canonical tag? If any live example to see so that's good for me and make me more confident.
Intermediate & Advanced SEO | | CommercePundit0