Do I need to do a 301, as well as adding re-write rules on Apache
-
I'm sure this has probably been asked somewhere before...
We're implementing a URL re-write rule to convert non dub pages to the www. subdomain and also removing all trailing slashes as part of a basic canonicalisation exercise.
The question is, as well as doing the URL rewrites within htaccess, should I also 301 those duplicate pages or does the URL rewrite do the job on it's own?
Thanks mozzers.
-
Eric's answer was perfect. After launch, I also do a site:nameofdomain.com and click on a random sampling of links to make sure the rules work perfectl (this is more useful if the page name changes). Good luck!
-
The URL rewrite "should" take care of it. So, when you enter www.domain.com/page.html it would 301 redirect to domain.com/page.html (or vice versa). Once you have the rewrites in place, then test them by going to a page and see if it redirects properly. Use a http server header checker to see if it's serving up a 301.
Even though the internal links may be using your preferred domain, then you'll want to make sure that anyone requesting (or linking to) the "wrong version" will be 301 redirected to the right version of the page.
Also, I would go into Google Search Console and make sure you tell Google which version is your preferred version: the www or non-www version of your site.
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
-
Is writing good content the best SEO?
Hi, After reading Mr. Shepard's amazing article on the 7 concepts of advanced on-page SEO (https://moz.com/blog/7-advanced-seo-concepts), I decided to share my own experience in hopes of helping others. I started doing legal SEO back in 2013. At the time I really didn't know much about SEO. My first client (my brother) had recently left the D.A.'s office to become a criminal defense attorney. I told him to write content for the following areas: domestic violence, sex crimes, and homicide. He finished his first content piece on domestic violence and I was not impressed. It seemed too unique, individualized, and lacked the "generic" feel that many of the currently ranking pages had. Please note that I don't mean "generic" in a negative way. I just mean that his content regarding domestic violence felt too personalized. Granted, his "personalized" approach came from a Deputy D.A. with over 13 years handling domestic violence, sex crimes, and murder cases. I was inclined to re-write his content, but lacking any experience in criminal law I really had no choice but to use it. IMPORTANT: Please note that I barely knew any SEO at the time (I hadn't even yet discovered MOZ), and my brother knew, and continues to know, absolutely nothing about SEO. He simply wrote the content from the perspective of an attorney who had spent the better part of 13 years handling these types of cases. The result? Google: "Los Angeles domestic violence lawyer/attorney", "Los Angeles sex crimes lawyer/attorney", and "Los Angeles homicide attorney." They have held those spots consistently since being published. I know that MANY other factors contribute to the success of content, but at the time I published them we had few links and very little "technical SEO." Unfortunately, I started learning "SEO" and applied standard SEO techniques to future content. The result? Never as good as the articles that were written with no SEO in mind. My purpose in writing this is to help anyone about to tackle a new project or revamp an existing site. Before getting too caught up in the keywords, H tags, and all the other stuff I seem to worry too much about, simply ask yourself - "is this great content?" Thanks again to the MOZ team for the great advice they have shared over the years. Honestly, I think I sometimes become overly reliant on SEO b/c it seems easier than taking the time to write a great piece of content. P.s. Any "SEO" stuff you see on the above-mentioned pages was done by me after the pages ranked well. P.p.s. I don't mean to imply that the above-mentioned pages are perfect, because they are not. My point is that content can rank well even without any emphasis on SEO, as long as the person writing it knows about the subject and takes the time to write something that readers find useful.
Intermediate & Advanced SEO | | mrodriguez14403 -
Is re-branding safe?
I am not entirely pleased with my website's name and have been willing to change it for years. I feel it is not brand-able. But since its an old domain name and overall figures of DA, PR, Moz score etc. are very good, I have been wary of changing the name and doing a 301 permanent re-direct from the existing name to the new one. Please suggest me if I should go for it. If yes, what are the best practices to go about it.
Intermediate & Advanced SEO | | KS__0 -
How does Google treat chained 301 redirects?
I did the following two chained 301 redirects (A->B->C) Plural to Singular to New Domain A. http://domain1.com/filenames B. http://domain1.com/filename C. http://domain2.com/filename To new domain without www and then back to origining domain A. http://www.domain1.com/filename B. http://domain2.com/filename C. http://domain1.com/fifilename How much link juicy will be rediectetoto URL C in above two scenarios?
Intermediate & Advanced SEO | | Bull1350 -
Why some category posts not rank well on Google?
Hello! I have a wired issue. Some categories blog post rank well on the Google, but some of them not in the Google's first 10 page. For an instance if my windows computer related post rank well, but Linux computer related posts not rank well on the Google. After published all the posts, I bookmark them 5-8 bookmarking sites (80% of them do-follow). All of these bookmarking sites have PR 3-6. What could be the reason? And how do I improve their ranking? Thanks!
Intermediate & Advanced SEO | | Godad0 -
How related to your industry do your links need to be?
Hello, Some of the hottest link building techniques right now are guest posting, viral content, and link bating. But I often see SEOs produce content that has very little relevance to the actually industry they are in. For instance, a dentist might build links by guest posting on a tech site, an attorney might create an infographic on color psychology, and an accountant might venture into celebrity gossip. While more advanced SEOs try to make sure that the content they produce has some relevance to their industry (even if it's marginal), where is the line drawn?
Intermediate & Advanced SEO | | lezal0 -
Google Re-Index or multiple 301 Redirects on the server?
Over a year ago we moved a site from Blogspot that was adding dates in the URL's (i.e.. blog/2012/08/10/) Additionally we've removed category folders (/category, /tag, etc). Overall if I add all these redirects (from the multiple date options, etc) I'm concerned it might be an overload on the server? After talking with the server team they had suggested using something like 'BWP Google Sitemaps' on our Wordpress site, which would allow Google some time to re-index our site. What do you suggest we do?
Intermediate & Advanced SEO | | seointern0 -
Is it worth re-doing SEO for all existent products
We have a website and when we started, we had no clue about SEO, nor did we really understand the full extent of CRO amongst other things. We have slowly learnt that there are many changes that need to happen to our site; however...do we need to re SEO all the content that is already on the website or can we purely start a fresh with the new products we feed through? The website is: www.onlineforequine.co.uk if you need to take a look at the kind of platform we are working with.
Intermediate & Advanced SEO | | onlineforequine0 -
I need some blogging advice please!
My name is Matthew and I am a new PRO member and founder of my own Internet marketing company in KS. So far I love the interaction and tools and functionality of seomoz. I am a true student of seo and love the subject. My dilemma is I know a blog is an important piece of any good seo campaign but I know very little about HOW to blog well......this is my new site and blog page. I only have a couple articles so far but many more planned. http://sawwebmarketing.com/seo-blog/ When I read an article that would be particuarly beneficial for my visitors can i post or share that on MY blog (giving the author the credit of course) without google thinking its duplicate content? is there anything specific I need to do with my blog for google to "see" the new, fresh content that is being added to the site? I have seen "tagged" items at the bottom of some blogs. Is this important? Some blogs will have a word or string of 2-3 words that are a link to a specific website. Does this help me or just them or just people reading the blog? **All I know is articles I write need to be relevant to my site and interesting and ORIGINAL and of benefit to my site visitors. ** Any advice that would help insure my blog articles get me all the juice they can would be GREATLY appreciated! Thank you in advance! Matthew ps - my site only went live a couple days ago so I am still working on a few onpage items but ANY feedback about the site itself would be spectacular! Have a GREAT weekend!
Intermediate & Advanced SEO | | Mrupp440