Htaccess Question - Is this the way to go to consolidate?
-
Hi all,
My site seems to have www.xyz.com, http://www.xyz.com, http://xyz.com and other variations! From an old agency doing this. All showing differing backlinks etc. SO I want to merge them so I can just look at one analytics account - with everything combined.
I want it just to consolidate all to https:///www.xym.com as the client wants - how do I do this? Does it take long to take effect??
Also I presume in webmaster I'll have to set up the preferred extension?
Thanks very much for any advice
-
We can help you get all those urls to point to the https on the server. But what reports are you referring to?
-
It's actually just by looking at link reports to the variations that I can see they fluctuate with differing versions. So I'm looking for a simple way to make sure all the prefixes redirect to https://. Thanks for the comments so far.
-
Excellent addition. Probably a combination of both since he states that the client wants to migrate to HTTPS. We'll have to get clarification from Giles.
-
Ryan,
I was going to mention this but after I re-read it. It seems he is dealing with an issue inside Google Webmaster Central that shows reports for more then one domain. I have seen this before where they list domains likehttp://www.site.com
http://www.site.com/shop
http://www.site.com/Each showing different metrics.
Please correct me if I'm wrong.
-
Hi Giles. You'll end up with something similar to this:
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*) https://%{SERVER_NAME}/$1 [R,L]RewriteRule ^page1(.*) https://%{SERVER_NAME}/page1$1 [R,L]
The first being an example of redirecting an entire domain to HTTPS and the second, a specific page.
The effects of the redirection are immediate in the sense that once the .htaccess file is changed the redirection will be in place. What takes a longer amount of time is for the change to carry over in Google's ranking and throughout the web. Using the tools in GWT and Bing can help.
Here are a couple of guides that you might find useful: http://moz.com/blog/web-site-migration-guide-tips-for-seos and http://moz.com/learn/seo/redirection.
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
-
Google Rank 0 - Best way?
We are trying to create tables or bullet points on each of our pages summarising the content of the page and get it to rank on position 0 on Google. This technique worked for some searches but not all so we were wondering: Is it beneficial to add links or not ? Is there a keyword limit? We are on Magento 2 if that helps. Thanks James
Intermediate & Advanced SEO | | JamesDavison0 -
Taxonomy question - best approach for site structure
Hi all, I'm working on a dentist's website and want some advice on the best way to lay out the navigation. I would like to know which structure will help the site work naturally. I feel the second example would be better as it would focus the 'power' around the type of treatment and get that to rank better. .com/assessment/whitening
Intermediate & Advanced SEO | | Bee159
.com/assessment/straightening
.com/treatment/whitening
.com/treatment/straightening or .com/whitening/assessment
.com/straightening/assessment
.com/whitening/treatment
.com/straightening/treatment Please advise, thanks.0 -
Migration Challenge Question
I work for a company that recently acquired another company and we are in the process of merging the brands. Right now we have two website, lets call them: www.parentcompanyalpha.com www.acquiredcompanyalpha.com We are working with a web development company who is designing our brand new site, which will launch at the end of September, we can call that www.parentacquired.com. Normally it would be simple enough to just 301 redirect all content from www.parentcompanyalpha.com and www.acquiredcompanyalpha.com to the mapped migrated content on www.parentacquired.com. But that would be too simple. The reality is that only 30% of www.acquiredcompanyalpha.com will be migrating over, as part of that acquired business is remaining independent of the merged brands, and might be sold off. So someone over there mirrored the www.acquiredcompanyalpha.com site and created an exact duplicate of www.acquiredcompanybravo.com. So now we have duplicate content for that site out there (I was unaware they were doing this now, we thought they were waiting until our new site was launched). Eventually we will want some of the content from acquiredcompanyalpha.com to redirect to acquiredcompanybravo.com and the remainder to parentacquired.com. What is the best interim solution to maintain as much of the domain values as possible? The new site won't launch until end of September, and it could fall into October. I have two sites that are mirrors of each other, one with a domain value of 67 and the new one a lowly 17. I am concerned about the duplicate site dragging down that 67 score. I can ask them to use rel=canonical tags temporarily if both sites are going to remain until Sept/Oct timeframe, but which way should they go? I am inclined to think the best result would be to have acquiredcompanybravo.com rel=canonical back to acquiredcompanyalpha.com for now, and when the new site launches, remove those and redirect as appropriate. But will that have long term negative impact on acquiredcomapnybravo.com? Sorry, if this is convoluted, it is a little crazy with people in different companies doing different things that are not coordinated.
Intermediate & Advanced SEO | | Kenn_Gold0 -
Launching V2 of my site - what questions to ask the SEO Agency
Hi I am in the process of launching a new version of my site and I know I need to get my current SEO Agency to check and test certain aspects of the site so that I don't lose any rankings. The problem is I am unsure of everything to ask them and I was wondering if someone could help me out. I don't want to have missed something basic and therefore want to give them a checklist to confirm they are happy before go live. Any help appreciated
Intermediate & Advanced SEO | | Andy-Halliday1 -
Best way to handle page filters and sorts
Hello Mozzers, I have a question that has to do with the best way to handle filters and sorts with Googlebot. I have a page that returns a list of widgets. I have a "root" page about widgets and then filter and sort functionality that shows basically the same content but adds parameters to the URL. For example, if you filter the page of 10 widgets by color, the page returns 3 red widgets on the top, and 7 non-red widgets on the bottom. If you sort by size, the page shows the same 10 widgets sorted by size. We use traditional php url parameters to pass filters and sorts, so obviously google views this as a separate URL. Right now we really don't do anything special in Google, but I have noticed in the SERPs sometimes if I search for "Widgets" my "Widgets" and "Widgets - Blue" both rank close to each other, which tells me Google basically (rightly) thinks these are all just pages about Widgets. Ideally though I'd just want to rank for my "Widgets" root page. What is the best way to structure this setup for googlebot? I think it's maybe one or many of the following, but I'd love any advice: put rel canonical tag on all of the pages with parameters and point to "root" use the google parameter tool and have it not crawl any urls with my parameters put meta no robots on the parameter pages Thanks!
Intermediate & Advanced SEO | | jcgoodrich0 -
A question of rankings (with actual domains)
Working with the main site featured in this Open Site Explorer comparison (you'll need a pro account to view this), and have been for quite some time. Recently we've slid behind Ebay (huge brand, I get it), but the other competitors don't really make sense to me. Main phrase is pontoon boats, and maybe I'm too close to this, but we seem to be in the best shape overall in terms of the domain, the page itself, and even our social media is pretty successful (we're closing in on 5,000 likes and have a pretty engaged audience). More internal linking is an opportunity, but I'd like another set of eyes (or several for that matter) to weigh in on opinions. I'm a bit stumped. Thanks Mozzers!
Intermediate & Advanced SEO | | NetvantageMarketing0 -
Anchor text questions - What are your thoughts?
Hi, I want to talk about anchor text and the effect it has on search engines (Good & Bad). Here is a fictitious example we can talk about: www.supercoolrunningsneakers.com Title Tag: Running Sneakers - The Super Trendy Running Trainers Keywords targeted: Running Sneakers, Running Trainers How would you vary your anchor text to target these terms? If you had 50 unique articles to play with how would you vary the anchor text using the articles? Would you push 25 articles at 'Running Sneakers' and the other 25 at 'Running Trainers' or would you link some articles using the domain name anchor text? Q: I'm guessing running 50 articles using anchor text 'Running Sneakers' would benefit the SERP's moe for that term then mixing it up with say 'Running Sneakers', 'Running Trainers' & 'Domain Name Links'. Cheers
Intermediate & Advanced SEO | | activitysuper0 -
Question about 301 redirect for trailing / ?
I am cleaning up a fairly large site. Some pages have a trailing slash on the end some don't. Some of the existing backlinks built used a trailing slash in the url and some didn't. We aren't concerned with picking a particular one but just want to get one set and stick to it from now on. I am wondering, would I clean this up within the same redirect in the htaccess file that takes care of the www and non www? example RewriteEngine On
Intermediate & Advanced SEO | | PEnterprises
RewriteBase /
RewriteCond %{HTTP_HOST} ^www.domain.com/ [NC]
RewriteRule ^(.*)$ http://domain.com$1 [L,R=301] I currently use that to redirect the www. to the non www as you can see. However here is what I was confused about. Would this code be enough to redirect ALL pages with a / to the ones without? or would I also need to add another code (so there is 2) to my htaccess like below? RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^domain.com/ [NC]
RewriteRule ^(.*)$ http://domain.com$1 [L,R=301] RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www.domain.com/ [NC]
RewriteRule ^(.*)$ http://domain.com$1 [L,R=301] That way, now, even the non www pages with a trailing slash will redirect to the non www without the trailing slash. Hopefully you understand what I am getting at. I just want to redirect EVERYTHING to the non www WITHOUT a / Thank you Jake0