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
-
Keyword Cannabalisation & Ecommerce
Hi I have an Ecommerce site, with a lot of similar products - for example leather office chairs - 80 products all very similar.. We worked to optimise product pages for longer tail phrases such as black executive leather office chair, but we now have different product pages trying to rank for these longer tail phrases as well. Now I'm trying to decide whether to focus on some priority product pages - adding lots of useful content/videos etc to try & boost the ones we want to rank for the long tail. OR whether to focus on the category page, and getting this to rank for all keyword variations... I'm a it stuck - any advice is welcome!
Intermediate & Advanced SEO | | BeckyKey0 -
AMP Benefits
Hello, Does AMP have ranking benefits ? Should I just AMP my post or all the pages of my website, product page, homepage etc... Thank you,
Intermediate & Advanced SEO | | seoanalytics0 -
Href Lang & Canonical Tags
Hi I have 2 issues appearing on my site audit, for a number of pages. I don't think I actually have an issue but just want to make sure. Using this page as an example - http://www.key.co.uk/en/key/0-5-l-capacity-round-safety-can-149p210 The errors I get are: 1. Conflicting hreflang and rel=canonical Canonical page points to a different language URL - when using href & canonicals, it states I need a self referential canonical . The page above is a SKU page, so we include a canonical back to the original model page so we don't get lots of duplicate content issues. Our canonical will point to - http://www.key.co.uk/en/key/justrite-round-safety-cans 2. No self referencing hreflang. Are these big issues? I'd think the bigger issue would be if I add self referencing canonicals and end up with lots of duplicate content. Any advice would be much appreciated 🙂
Intermediate & Advanced SEO | | BeckyKey0 -
Does google index the mobile version or the desktop version?
We use different headlines and text on our mobile site vs. the desktop. Our desktop headlines and text is highly optimized for SEO purposes, but because of user experience and space limitations the headlines and text on the mobile version isn't great for SEO. I'm wondering, what will google look at and will it make a difference? Thanks!
Intermediate & Advanced SEO | | Postable0 -
Https & http urls in Google Index
Hi everyone, this question is a two parter: I am now working for a large website - over 500k monthly organic traffic. The site currently has both http and https urls in Google's index. The website has not formally converted to https. The https began with an error and has evolved unchecked over time. Both versions of the site (http & https) are registered in webmaster tools so I can clearly track and see that as time passes http indexation is decreasing and https has been increasing. The ratio is at about 3:1 in favor of https at this time. Traffic over the last year has slowly dipped, however, over the last two months there has been a steady decline in overall visits registered through analytics. No single page appears to be the culprit, this decline is occurring across most pages of the website, pages which traditionally draw heavy traffic - including the home page. Considering that Google is giving priority to https pages, could it be possible that the split is having a negative impact on traffic as rankings sway? Additionally, mobile activity for the site has steadily increased both from a traffic and a conversion standpoint. However that traffic has also dipped significantly over the last two months. Looking at Google's mobile usability error's page I see a significant number of errors (over 1k). I know Google has been testing and changing mobile ranking factors, is it safe to posit that this could be having an impact on mobile traffic? The traffic declines are 9-10% MOM. Thank you. ~Geo
Intermediate & Advanced SEO | | Geosem0 -
Indexed non existent pages, problem appeared after we 301d the url/index to the url.
I recently read that if a site has 2 pages that are live such as: http://www.url.com/index and http://www.url.com/ will come up as duplicate if they are both live... I read that it's best to 301 redirect the http://www.url.com/index and http://www.url.com/. I read that this helps avoid duplicate content and keep all the link juice on one page. We did the 301 for one of our clients and we got about 20,000 errors that did not exist. The errors are of pages that are indexed but do not exist on the server. We are assuming that these indexed (nonexistent) pages are somehow linked to the http://www.url.com/index The links are showing 200 OK. We took off the 301 redirect from the http://www.url.com/index page however now we still have 2 exaact pages, www.url.com/index and http://www.url.com/. What is the best way to solve this issue?
Intermediate & Advanced SEO | | Bryan_Loconto0 -
Why is my website redirecting to www.domainname.comwww.domainname.com?
It seems as if a website i have just started working on has a major issue where the 404 page isn't set up properly. When you go to a page that doesn't exist it redirects like this.. "www.domainname.comwww.domainname.com" How can i fix this? Cpanel Host. Very old version of joomla and virtuemart. I looked at the visitor flow and about 200 visitors monthly that are dropping because of this.
Intermediate & Advanced SEO | | JohnParker27920 -
Ranking problems
Hi All My site is live for a year now. I;m getting tons of traffic (alexa 54k) and business are good. The only problem is that I have 0 page rank....I have checked again and again the site;s structure to see if there is anything wrong with the site but everything seems to be ok. Google just added search links to the site (megamoneygames) which looks very nice. For example, none of my competitors have search links but they all have page rank of 4 while I have 0. In addition, for some reason the site's age (days) shows 0 although it is live for a year now... Do you have any idea of what is going on? do I have errors in the site? Thanks
Intermediate & Advanced SEO | | Pariplay0