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
-
Cached of live version for ranking
Hello, Is google using the cached version of the live version for ranking a website (if those are different) Thank you,
Intermediate & Advanced SEO | | seoanalytics0 -
How can I use AMP html on a CMS
I have been trying to research using AMP to improve our mobile speed. We have a whole lot of sites on the same platform managed by a CMS. From what I have read, AMP html can only be used on static pages. Does that mean we would not be able to incorporate this into the html through our CMS? I would like to implement this across all our homepages to test the effectiveness of it if possible, but there is no way to rebuild all our homepages statically. Any advice is much appreciated!
Intermediate & Advanced SEO | | chrisvogel0 -
Switching site from non-www to www
Howdy folks, I've got a website that is roughly 3 months old. I created it as a naked URL as I often prefer the look but I've noticed that a lot of my competition has www and also some of my clients seem to prefer it as well. I feel like switching it to www will be of long-term benefit for my site. The problem is that I currently have several pages with first page rankings and a backlinks. I am wondering what the negative effects of switching it to www would be, and how I can minimize any issues. I am guessing I should do a redirect, and I have access to some of the backlinks so I can change those as well, but is there anything else? Thoughts? I appreciate the feedback!
Intermediate & Advanced SEO | | jameswesleyhunt1 -
Canonical URL & sitemap URL mismatch
Hi We're running a Magento store which doesn't have too much stock rotation. We've implemented a plugin that will allow us to give products custom canonical URLs (basically including the category slug, which is not possible through vanilla Magento). The sitemap feature doesn't pick up on these URLs, so we're submitting URLs to Google that are available and will serve content, but actually point to a longer URL via a canonical meta tag. The content is available at each URL and is near identical (all apart from the breadcrumbs) All instances of the page point to the same canonical URL We are using the longer URL in our internal architecture/link building to show this preference My questions are; Will this harm our visibility? Aside from editing the sitemap, are there any other signals we could give Google? Thanks
Intermediate & Advanced SEO | | tomcraig860 -
Google Crawl Rate and Cached version - not updated yet :(
Hi, Ive noticed that Google is not recognizing/crawling the latest changes on pages in my site - last update when viewing Cached version in Google Results is over 2 months ago. So, do I Fetch as Googlebot to force an update? Or do I remove the page's cached version in GWT remove urls? Thanks, B
Intermediate & Advanced SEO | | bjs20100 -
Duplicate titles and descriptions problem?
We had an old site that used the urls for items site.com/32423432 we changed that to site.com/item name The old stuff has gone away and we have 301 redirects up. For some reason we are getting hit with duplicate titles on those pages and duplicate meta tags. The site relaunch was in November and we have a had a few problems but this just started showing up in the last week after having gone down. Any thoughts on a fix?
Intermediate & Advanced SEO | | EcommerceSite0 -
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 -
Navigation - Balancing UX & SEO
I'm currently evaluating our navigation in the course of a site relaunch. From reading a number of articles and posts on seoMOZ, here are the elements I've found important to consider: Use CSS (not Javascript) for the primary drop-down navigation menu Get rid of two design elements from our earlier days: The 30 something site-wide category links in the footer, and many no-followed internal links (in an attempt to sculpt PR) Keep all pages within 3 clicks of the homepage, and have ample cross-links within internal pages. The one major problem I'm facing is how to balance UX and SEO in the primary navigation bar. To illustrate, let's assume I sell Tennis equipment. If one of the top-level categories on my navigation bar was "Rackets", if I was designing purely with SEO in mind the category names would be: Tennis Rackets -> Wilson Tennis Rackets Head Tennis Rackets Prince Tennis Rackets ....as the full, three word anchor text will be most specific and valuable to pass reputation to the category pages. However, from a UX perspective, writing "Tennis Rackets" after each category is unnecessary, and it would look MUCH cleaner to instead have: Tennis Rackets -> Wilson Head Prince ....but this would obviously be less beneficial from a SEO standpoint for each individual, manufacturer racquet page as the entire search term ("Wilson Tennis Rackets") is not in the anchor text. As these links will be on every page of the site, I'm struggling with which to choose - clean navigation or improved SEO. My Questions: I would love to hear the communities thoughts on how to weigh the balance of these two - clean UX navigation vs. SEO-rich specific anchor text - in navigation. Also, I'd appreciate hearing if any of my original 3 assumptions for the re-design are off-base or incorrect. Thank you!
Intermediate & Advanced SEO | | AndrewY0