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
-
Urgent: Any point having /au version of the website for Australia?
Hi, We just migrated our website from /uk to the global one (but we still kept /us). We are expanding our business to Australia. Is there any point having the global .com site duplicated as .com/au provided the content will be identical? What's the /au impact on the domain strength and rank in Australia in comparison to having just .com. Is there any point? Anyone has direct experience? What's the best practice? Many thanks for the answers. Katarina
Intermediate & Advanced SEO | | Katarina-Borovska1 -
Pagination & Canonicals
Hi I've been looking at how we paginate our product pages & have a quick question on canonicals. Is this the right way to display.. Or should the canonical point to the main page http://www.key.co.uk/en/key/euro-containers-stacking-containers, so Google doesn't pick up duplicate meta information? Thanks!
Intermediate & Advanced SEO | | BeckyKey0 -
Magento Trailing Slash URL Problem
Howdy Mozzers! Our magento store URL's are accessible with or without a trailing slash at the end. Canonical's and 301 redirects are not set up for one of them at the moment. Will this cause duplicate issue? Do we need to set canonical or 301 up? Which one is recommended? MozAddict
Intermediate & Advanced SEO | | MozAddict0 -
Google Sitemap only indexing 50% Is that a problem?
We have about 18,000 pages submitted on our Google Sitemap and only about 9000 of them are indexed. Is this a problem? We have a script that creates a sitemap on a daily basis and it is submitted on a daily basis. Am I better off only doing it once a week? Is this why I never get to the full 18,000 indexed?
Intermediate & Advanced SEO | | EcommerceSite0 -
How can I remove duplicate content & titles from my site?
Without knowing I created multiple URLs to the same page destinations on my website. My ranking is poor and I need to fix this problem quickly. My web host doesn't understand the problem!!! How can I use canonical tags? Can somebody help, please.
Intermediate & Advanced SEO | | ZoeAlexander0 -
SEO - Product Related MiniSites: Hosting & Domains
Hey Mozzers, I would first like to thank everyone in advance for replying to my question 😉 Actually, my question is 2-part: Hosting & Domains 1) We are currently researching product-related domains and would like to build-out review style mini-sites on WordPress that link back to our main site product pages. We're using X-Cart platform and X-Cart offers a WordPress module. My Dev. recommends installing a main WordPress mini-site template on my server and replicating this template under different domains/unique content, obviously ;-). -My questions is; For backlink purposes, would it be better to host these WordPress pages in a different location/server? 2) Domains (which domain extensions are the best): I have read mixed reviews on this subject ... a) Do dashes (i,e. brand-model.com) have an impact as well?? I read a post regarding this; http://www.commonsensemarketing.net/do-domain-name-extensions-matter/ - and the general feeling was that .com and .net ranked higher, faster but that .info wasn't a bad runner up. I was a bit excited to hear that .info wasn't a bad choice as they are actually "available" and cheap as well (under 3 bucks) until a comment was posted about a "Market Samurai" study. They reported testing 4 domain names (below) with the same article, date & time post . 1. domainname.com
Intermediate & Advanced SEO | | k9byron
2. domainname.org
3. domainname.net
4. domain-name.com -My question is: Can anyone give any advise on which domain extensions work better/rank higher faster? com / .net / .org / .info / ect? Also, is it better to have more product related keywords in the domain? Example, one of my products is the "Dogtra 280ncp Platinum". WordStream exact match tells me that "dogtra 280ncp" gets 210 searches per month and that "dogtra 280ncp platinum" gets another 91 searches per month. I'm guessing that its better to buy www.Dogtra280ncpPlatinum.com instead of www.Dogtra280ncp.com as we would pick up the searches for the "platinum" term as well? Question Summary: Is it better to host these mini-sites on another server than my main site? Which domain extensions work better? Is it better to use as many product related keywords in the domain as possible and maybe even throw modifiers in there as well such as "buy" or "review"? Thanks Again!
Byron-0 -
Problem with 404 and 500 Status code pages
Dear SeoMozzers, I have a question related to one of the sites I have recently changed the URL, going from http:example.com to http://www.example.com I did 301 redirects, as I was recommended to do. In the past month I have noticed an incredible drop in Google's rankings for many keywords and checking the crawling errors appearing in the SEO Crawling Report I have witnessed mayhem with Canonical/301 redirect types of errors. Now, things seem a little better. I have noticed a reduction in the number of 301 and Canonical type or errors (by the way, I still do not get the Canonical issue :-)). My little questions are the following: Will I ever go back to the positions I used to occupy before I redesigned the site's URL structure? I have now noticed that the SeoMoz Crawling report show "404 Staus" errors and one "505 Status" error. Can somebody please tell me how to fix the 404 Status Errors? Can I fix them by myself, or maybe I can ask the guys at the web hosting company, since I am really bad at taking care of technical issues? Thank you for the time you took to clarify my doubts. Ad maiora, Sal
Intermediate & Advanced SEO | | salvyy0 -
Should we block urls like this - domainname/shop/leather-chairs.html?brand=244&cat=16&dir=ascℴ=price&price=1 within the robots.txt?
I've recently added a campaign within the SEOmoz interface and received an alarming number of errors ~9,000 on our eCommerce website. This site was built in Magento, and we are using search friendly url's however most of our errors were duplicate content / titles due to url's like: domainname/shop/leather-chairs.html?brand=244&cat=16&dir=asc&order=price&price=1 and domainname/shop/leather-chairs.html?brand=244&cat=16&dir=asc&order=price&price=4. Is this hurting us in the search engines? Is rogerbot too good? What can we do to cut off bots after the ".html?" ? Any help would be much appreciated 🙂
Intermediate & Advanced SEO | | MonsterWeb280