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
-
Non-optimised pages ranking higher than optimised homepage
I'm a developer working with a dating site and we're having what appear to be unusual ranking behaviour for the keyword "Ukraine Brides". When searching for "Ukraine Brides" we typically have the top 3 results in Google, however the homepage is almost never ranked #1. Other non-optimised pages appear ahead of it. I believe this is having a negative affect on our conversion rate, so wish to see this resolved. For instance, if you search here in NZ, the results are typically: Login page (/account/login) Search page (/search) Home page (/) Similar situation when searching in the US, but typically the top result is the search page. Is this unusual? We've spent quite a bit of time optimising the homepage, it has more external links, more internal links, better content that targets the keyword, more traffic, etc. Even so, the login and search pages appear higher. A side note, the average CTR for "Ukraine Brides" is significantly lower than "Ukraine Brides Agency" (20% vs 80% respectively), so I don't think that it's purely a 'brand keyword'. A few thoughts were: The search page is not accessible from the homepage unless you are logged in. Maybe this is causing some sort of linking/seo/ranking issue? Re: the login page being higher, perhaps many existing users visit the login page directly from this keyword in order to login straight away so Google pushes this to the top. I think this is less likely because most existing users will be logged in automatically (via cookies "remember me") and the homepage has a login form in anycase The site supports multiple languages. Maybe this is causing some canonical issues? There was an additional suggestion that we should noindex the login and search pages in order to resolve this ranking issue, but were nervous that we'd lose a large amount of organic clicks if we did this. Google must be doing this for a reason, so we wanted to resolve that underlying reason before dropping the noindex hammer. The fear is of course that we've done something wrong with our homepage which is causing it to perform poorly and thus these other pages rank higher. The hope would be that if we fixed that, that our rank for other keywords would improve also. It would be great if we could get some more eyes on this to hopefully confirm we're not doing anything silly, and are just generally after a second opinion.
Intermediate & Advanced SEO | | andrew_uba0 -
Does non-critical AMP errors prevent you from being featured on Top Stories Carousel?
Consider site A which is a news publishing site that has valid AMP pages with non-critical AMP pages (as notified within Search Console). Also, Site A publishes news articles from site B (its partner site) and posts it on site A which have AMP pages too but most of them are not valid AMP pages with critical AMP errors. For brand terms like Economic Times, it does show a top stories carousel for all articles published by Economic Times, however it doesn't look the same for site A (inspite of it having valid AMP pages). Image link: http://tinypic.com/r/219bh9j/9 Now that there are valid AMP pages from site A and invalid AMP pages from site B on site A, there have been instances wherein a news article from site A features on the top stories carousel on Desktop for a certain query whereas it doesn't feature on the mobile SERPs in spite of the page being a valid AMP page. For example, as mentioned in the screenshot below: Business Today ranks on the Top Stories carousel for a term like “jio news” on Desktop, but on Mobile although the page is a valid AMP page, it doesn’t show as an AMP page within the Top Stories Carousel. Image Link: http://tinypic.com/r/11sc8j6/9 There have been some cases where although the page is featured on the top carousel on desktop, the same article doesn't show up on the mobile version for the same query on the Top Stories Carousel. What could be the reason behind this? Also, would it be necessary to solve both critical and non-critical errors on site A (including those published from site B on site A)?
Intermediate & Advanced SEO | | Starcom_Search1 -
Implementing AMP pages on WordPress blog
Hey Moz Users, Has anyone tried using the WordPress plugin for AMP pages on their blog yet? Here's the link to it: https://wordpress.org/plugins/amp/. The implementation seems pretty straightforward but since there will be an AMP and a mobile friendly version of the posts on my blog I'm worried it will create a lot of duplicate content issues. I've seen a lot of articles pointing to a rel canonical tag that can be used to fix this situation. Not sure if I'm going to have an AMP version of all the posts on my blog, so this seems like it would be a pain to place the tag manually on specific pages with the AMP version only. Has anyone tried this plugin and what have you done to fix this duplicate content issue? Thanks
Intermediate & Advanced SEO | | znotes0 -
Drop in Mobile & Tablet Rankings
We have pretty strong rankings and have done since we launched our business in 2004. Over the past two months, we have seen a strong growth in rankings after a bit of a drip last year, however over the past week we have seen a significant drop off in organic traffic. Further analysis has shown that this is coming from mobile/tablet traffic, as the desktop traffic has been fairly consistent. There does appear to be a drop (across all main keywords) on mobile/tablet, but again there is no noticeable drop in desktop rankings. I am obviously aware Google treats these differently, but we can find no obvious reasons why this might have occurred. It is almost as if some sort of penalty has been applied on mobile/tablet only. There are no warnings or obvious problems in webmaster tools and our mobile/tablet site is mobile optimised. At a bit of a loss and would appreciate a bit of guidance in where you think we should start to understand what is causing this and how we should go about correcting it. Thanks in advance for the help.
Intermediate & Advanced SEO | | simonukss0 -
Too Many External Links A Problem
Client is thinking of adding a directory to an eCommerce site which users would find useful. It would help users find other services and vendors that are specific to the niche of products this site is selling. My only concern is it would create a number of external links to other sites. Even though they're related, would this diminish our standing with Google search?
Intermediate & Advanced SEO | | alrockn0 -
Any arguments against eliminating all (non-blog) subfolders?
Short URLs seem to do the trick from a UX perspective. For example: /primary-care vs. /why/specialties/primary-care . This convention will be applied over 30-40 pages. Note that while "/why/specialties/primary-care" isn't terribly ugly, some of our pages would look a little overly-keywordy if we go with the subfolder approach.
Intermediate & Advanced SEO | | NueMD0 -
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 -
Image Galleries & Leaking Pagerank
I have a website in a niche that's highly graphical in nature. Most of the pages that I rank well for are mainly textual at the moment, but I'm gradually adding image galleries to these pages. The galleries consist of a number of thumbnails that are html linked to the large version of the image (via the Lightbox script). My question: will the page lose pagerank because of the many links from the thumbnails to the images (upto 30/page besides the normal links)?
Intermediate & Advanced SEO | | dirkla0