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
-
301 redirect recovery
Hello Please understand that English is poor. I used to run a site called A This time, I am running a site called B. I need to set up a temporary 302 redirect from A to B
Intermediate & Advanced SEO | | jinseok
I accidentally set a 301 redirect Site A has many spam links
For now I have removed the 301 redirect source to B. Will A's spam links affect site B?
For your reference, Site B is putting a lot of effort into SEO. Help me.0 -
301 Redirect to Home Page or Sub-Page?
What do you think about 301 redirect of good expired domain to a sub-page instead of the home page? I'm doing this so I don't hurt my brand name. Let me know your thoughts please. Thank you
Intermediate & Advanced SEO | | JuanWork0 -
Help needed on HTTPS
Hi Can anyone help me. I need some help with some example of large e-commerce sites going to https. Ideally these need to be e-commerce sites but any large site will be great, so that I can show the impact. The site can be based anywhere in the world, its more the impact I am after. Thanks Andy
Intermediate & Advanced SEO | | Andy-Halliday0 -
Order and multiple match when 301 redirect ?
Hi, I'm migrating a single domain to a multiple domain for each language, using apache redirections: Redirect 301 /partners http://www.itris-automation.com/
Intermediate & Advanced SEO | | 2MSens
Redirect 301 /partner-si http://www.itris-automation.com/system-integrators-partners
Redirect 301 /partner-institute http://www.itris-automation.com/institutional-partners
Redirect 301 /fr/ http://www.itris-automation.fr/
Redirect 301 /fr/support http://www.itris-automation.fr/support
Redirect 301 /privacy?lang=fr http://www.itris-automation.fr/politique-de-confidentialite Redirect 301 /de/plc-converter http://www.itris-automation.de/plc-converter
Redirect 301 /de/services http://www.itris-automation.de/
Redirect 301 /de/plc-quality http://www.itris-automation.de/sps-qualitat .... However it doesn't work properly: For example automationsquare.com/privacy?lang=fr redirect to http://www.itris-automation.com/privacy instead of http://www.itris-automation.fr/politique-de-confidentialite Does the order of the redirect has an influence? Am I missing something? I've seen that the command [L] can be useful to avoid mismatch? Thanks, Best, Benoit.0 -
Need help for new website!
I want to a make new website. Can you please advise me what all things are involved which I should keep in mind before and during the website preparation. Like how to make pages, what to include in website, best way to create pages etc. Please provide me the link where I can study all the above information. I am planning to create global printing website.
Intermediate & Advanced SEO | | AlexanderWhite0 -
301's & Link Juice
So lets say we have a site that has 0 page rank (kind of new) has few incoming links, nothing significant compared to the other sites. Now from what I understand link juice flows throughout the site. So, this site is a news site, and writes sports previews and predictions and what not. After a while, a game from 2 months gets 0 hits, 0 search queries, nobody cares. Wouldn't it make sense to take that type of expired content and have it 301 to a different page. That way the more relevant content gets the juice, thus giving it a better ranking... Just wondering what everybody's thought its on this link juice thing, and what am i missing..
Intermediate & Advanced SEO | | ravashjalil0 -
301 a PDF?
Hi Website A is moving to Website B. Website A has a number of PDFs - obviously I cant do a '301 redirect' on them. Any suggestions what to do with the PDFs? Many thanks in advance Nigel
Intermediate & Advanced SEO | | Richard5550 -
301 redirect
I have 2 websites, lets call them Website A and Website B. Website A is a commercial website, website B is a 7 years old blog. Website B has many natural, high quality BL, including some from Nytimes, etc. I want to integrate the blog (B) into the commercial website (A). The idea behind this thought is to compress the two websites, it is easier to have everything in one place. I will do this with 301 redirect via Webmaster tools, htaccess etc. The uRL structure will remain the same: eg: websiteB/post-title/ -> websiteA/post title What will happen with my quality BLs? Is there any chance to be penalized by Google? What will happen with the PR of the 2 sites? Thanks.
Intermediate & Advanced SEO | | jasmin281