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
-
Park Or 301
We main domain is **.com, but we have the other domain by name .ir.
Intermediate & Advanced SEO | | Pintapin
So now we want to remove (.ir).
what should we do? ,301? , park domain? Disallow?
Which is better for SEO?0 -
When is it time to kill 301 redirects
3 months we updated our site design design and as such lots of page urls changed. At the time we 301 redirected about 100 pages. (All pages are on the same domain - 301 redirects like .com/about-us/company to .com/company) Anyhow my question is should I leave these redirects active indefinitely or kill them assuming value has passed through by now? Your Thoughts are welcomed. Thanks, Glen.
Intermediate & Advanced SEO | | AdvanceSystems0 -
301 Redirects?
We have an e-commerce website with about 4500 products for sale. About 1200 of these items were not showing up in the Google PLA ads because they were $0 dollar items, so we made those products invisible. Then Set 301 Redirects for each of the 1200 items. My question is this; we want to turn back on the 1200 items, should we delete the 301 redirects that are in place for them.? Will it hurt SEO performance by having them?
Intermediate & Advanced SEO | | Goriilla0 -
Url rewrite & 301 redirects
Hi all I am having some issues rearding url rewrites and 301 redirects with 1 and 1 hosting and am unsure of the best approach. The website is a custom made shopping cart system with categories and products. The current urls for categories are : index.php?l=product_list&c=1 The new url format required is : /banner-stands The current urls for products are : index.php?l=product_detail&c=1&p=1 The new url format required is : /banner-stands/banner-stand Thanks
Intermediate & Advanced SEO | | vividwebdesign0 -
Adding another domain to my VPS, would it effect SEO?
I set up my business site on a VPS and its working great. The site is doing well ranking for my keywords. I have another domain name that I was going to host on the VPS also. The site will be in a completely new business and there will be no overlapping keywords at all. A separate business altogether. Can someone tell me if adding another site to the VPS I have cause any SEO issues as the last thing I want to do is negatively effect my main business site Thanks in advance
Intermediate & Advanced SEO | | JohnPeters0 -
301 redirects and Blogger - moving blog
Is there any way to add 301 redirects to individual posts on a blogger-hosted blog? We're getting ready to finally move our blog off of Blogger and onto our own webserver. We're probably going to use BlogEngine.net to run it. right now the blog is located at blog.MySite.com. We're probably going to move it to MySite.com/Blog. We don't have any really popular posts and we only really get ~10 visits a day on about 70 posts. Just trying to figure out the best way to handle this without inadvertently shooting myself in the foot.
Intermediate & Advanced SEO | | _JP_0 -
Questions about 301 Redirects
I have about 10 - 15 URLs that are redirecting to http://www.domainname.comwww.domainname.com/. (which is an invalid URL)The website is on a Joomla platform. Does anyone know how I can fix this? I can't figure out where the problem is coming from.
Intermediate & Advanced SEO | | JohnParker27920 -
Is it possible to 301 re-direct an entire subfolder on a subdomain?
So, for example, subdomain.domain/folder subdomain.domain/folder2 Is it possible to set up a 301-re-direct for an entire folder on a subdomain? If so, how? What is the correct code for this?
Intermediate & Advanced SEO | | nicole.healthline0