301 redirect a set of pages to one landing page/URL?
-
I'm planning to redirect the following pages to one new URL/landing page:
Old URLs:
http://www.olddomain.com/folder/page/1
http://www.olddomain.com/folder/page/2
http://www.olddomain.com/folder/page/3
http://www.olddomain.com/folder/page/4
http://www.olddomain.com/folder/page/5
http://www.olddomain.com/folder/page/6
New URL:
http://www.newdomain.com/new-folder/new-page
Code in .htaccess that I will be using:
RedirectMatch 301 /folder/page/(.*) http://www.newdomain.com/new-folder/new-page
Let me know if this is correct.
Thanks!
-
Hi Devanur,
I just sent you a private message.
Thanks a lot man!
-
Hi guys,
The redirection rules are working well but the landing pages are showing special parameters like the following:
http://www.olddomain.com/folder/page/1 TO http://www.newdomain/new-folder/new-page?cmd=divisionsMain&group=2&country=1&category=1&page=1
http://www.olddomain.com/folder/page/2 TO http://www.newdomain/new-folder/new-page?cmd=divisionsMain&group=2&country=1&category=1&page=2
http://www.olddomain.com/folder/page/3 TO http://www.newdomain/new-folder/new-page?cmd=divisionsMain&group=2&country=1&category=1&page=3
http://www.olddomain.com/folder/page/4 TO http://www.newdomain/new-folder/new-page?cmd=divisionsMain&group=2&country=1&category=1&page=4
http://www.olddomain.com/folder/page/5 TO http://www.newdomain/new-folder/new-page?cmd=divisionsMain&group=2&country=1&category=1&page=5
http://www.olddomain.com/folder/page/6 TO http://www.newdomain/new-folder/new-page?cmd=divisionsMain&group=2&country=1&category=1&page=6
http://www.olddomain.com/folder TO http://www.newdomain/new-folder?cmd=divisionsMain&group=2&country=1&category=1
Thanks in advance!
-
Hi guys,
Sorry for the late response. We will now test the mentioned redirect rule. I'll give you an update after.
Thanks!
-
I responded to one of his recent queries and then he pointed me to this question that he posted long time back that has been lying without being answered.
-
As long as you make sure this is placed in the correct tags, it should work fine.
This question was asked nearly a month ago - how did it turn out?
-
Hi friend,
Yes, the code you mentioned should work the way you expect without any issues.
Best,
Devanur Rafi
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 URL Shortener- Should I use one or multiple???
I have a client with a number of YouTube videos. I'm using Google URL Shortner to allow the link to show in the YouTube text (as its a long URL). Many of these links go to the same page ex .com/services-page Should I use a single short URL for each video linking to the .com/services-page or should they be unique each time? If unique, would Google possibly think I'm trying to manipulate results? Thanks in advance. I'm just not sure on this one and hope someone knows best practice on this. Thanks!
White Hat / Black Hat SEO | | mgordon1 -
Can a hidden menu damage a website page?
Website (A) - has a landing page offering courses Website (B) - ( A different organisation) has a link to Website A. The goal landing page when you click on he link takes you to Website A's Courses page which is already a popular page with visitors who search for or come directly into Website A. Owners of Website A want to ADD an Extra Menu Item to the MENU BAR on their Courses page to offer some specific courses to visitors who come from Website (B) to Website (A) - BUT the additional MENU ITEM is ONLY TO BE DISPLAYED if you come from having clicked on the link at Website (B). This link both parties are intending to track However, if you come to the Courses landing page on Website (A) directly from a search engine or directly typing in the URL address of the landing page - you will not see this EXTRA Menu Item with its link to courses, it only appears should you visit Website (A) having come from Website (B). The above approach is making me twitch as to what the programmer wants to do as to me this looks like a form of 'cloaking'. What I am not understanding that Website (A) URL ADDRESS landing page is demonstrating outwardly to Google a Menu Bar that appears normal, but I come to the same URL ADDRESS from Website (B) and I end up seeing an ADDITIONAL MENU ITEM How will Google look at this LANDING PAGE? Surely it must see the CODING INSTRUCTIONS sitting there behind this page to assist it in serving up in effect TWO VERSIONS of the page when actually the URL itself does not change. What should I advise the developer as I don't want the landing page of Website (A) which is doing fine right now, end up with some sort of penalty from the search engines through this exercise. Many thanks in advance of answers from the community.
White Hat / Black Hat SEO | | ICTADVIS0 -
All pages going through 302 redirect - bad?
So, our web development company did something I don't agree with and I need a second opinion. Most of our pages are statically cached (the CMS creates .html files), which is required because of our traffic volume. To get geotargeting to work, they've set up every page to 302 redirect to a geodetection script, and back to the geotargeted version of the page. Eg: www.example.com/category 302 redirects to www.example.com/geodetect.hp?ip=ip_address. Then that page 302 redirects back to either www.example.com/category, or www.example.com/geo/category for the geo-targeted version. **So all of our pages - thousands - go through a double 302 redirect. It's fairly invisible to the user, and 302 is more appropriate than 301 in this case, but it really worries me. I've done lots of research and can't find anything specifically saying this is bad, but I can't imagine Google being happy with this. ** Thoughts? Is this bad for SEO? Is there a better way (keeping in mind all of our files are statically generated)? Is this perfectly fine?
White Hat / Black Hat SEO | | dholowiski0 -
Moving content to a clean URL
Greetings My site was seriously punished in the recent penguin update. I foolishly got some bad out sourced spammy links built and I am now paying for it 😞 I am now thinking it best to start fresh on a new url, but I am wondering if I can use the content from the flagged site on the new url. Would this be flagged as duplicate content, even if i took the old site down? your help is greatly appreciated Silas
White Hat / Black Hat SEO | | Silasrose0 -
Why do websites use different URLS for mobile and desktop
Although Google and Bing have recommended that the same URL be used for serving desktop and mobile websites, portals like airbnb are using different URLS to serve mobile and web users. Does anyone know why this is being done even though it is not GOOD for SEO?
White Hat / Black Hat SEO | | razasaeed0 -
Powered by/Credit backlinks and nofollow
Pseudo question: I have a website that has 100K pages. On about 50K of those pages I have information that is fed to me via an outside 3rd-party website. Now, I like to give credit where credit is due, so I add a backlink to the website that is feeding me this content. A simple backlink like so: Information provided by: Company ABC Now, this 3rd-party website wants me to remove the nofollow tags from the backlink, but I am very, very skeptical because to me, sending ~50K dofollow backlinks to a single site might make the Google monster upset with me. This 3rd-party site is being very hard-headed about this, to the point where I am thinking of terminating the relationship all together. I digress. Scoured the net before writing this, but couldn't really find anything directly related to my issue. Thoughts? Is a nofollow required here? We're not talking 1 or 2 links here; we're talking tens of thousands (50K is low; it will probably be upwards of 100K when all is said and done as my site has many, many pages). Thanks in advance.
White Hat / Black Hat SEO | | THB0 -
How many times should one submit the same article to various websites? 1 time? 10 times? What is okay to do with the most recent Panda update?'
For link-building purposes, seemingly it was okay to post the same article to multiple sites for links in the past. However, after the most recent Panda update our thought is that this may not be a good practice. So the question is, how many times is okay to submit an article for link building purposes. Should you always only submit to one site? Is it okay to do more than once? What is the right way to submit for link-building in Google's eyes? Thanks
White Hat / Black Hat SEO | | Robertnweil10 -
Client Selling Links On One Site Hurt Their Other Site?
Hi, I have a client who is thinking about selling ads on one site they own via something like textlinkads.com. Do you think they run any risk of exposing their other sites to scrutiny, penalties or problems?
White Hat / Black Hat SEO | | 945010