Can I 301 redirect old URLs to staging URLs (ex. staging.newdomain.com) for testing?
-
I will temporarily remove a few pages from my old website and redirect them to a new domain but in staging domain. Once the redirection is successful, I will remove the redirection rules in my .htaccess and get the removed pages back to live.
Thanks in advance!
-
But what if I remove the 301 redirect rules in my .htaccess file right(a few minutes) after successfully checking the redirected URLs?
-
If the redirect to the testing site actually is temporary, this is one of the very few instances I would recommend using a 302 redirect. This way, the engines will understand that you aren't making this a permanent move and will, hopefully soon, remove the redirect when the staging site goes live.
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
-
Changing Links to Spans with Robots.txt Blocked Redirects using Linkify/jQuery
Hi, I was recently penalized most likely because Google started following javascript links to bad neighborhoods that were not no-followed. The first thing I did was remove the Linkify plugin from my site so that all those links would disappear, but now I think I have a solution that works with Linkify without creating crawlable links. I did the following: I blocked access to the Linkify scripts using robots.txt so that Google won't execute the scripts that create the links. This has worked for me in the past with banner ads linking to other sites of mine. At least it appears to work because those sites did not get links from pages running those banners in search console. I created a /redirect/ directory that redirects all offsite URLs. I put a robots.txt block on this directory. I configured the Linkify plugin to parse URLs into span elements instead of a elements and add no follow attributes. They still have an href attribute, but the URLs in the href now point to the redirect directory and the span onclick event redirects the user. I have implemented this solution on another site of mine and I am hoping this will make it impossible for Google to categorize my pages as liking to any neighborhoods good or bad. Most of the content is UGC, so this should discourage link spam while giving users clickable URLs and still letting people post complaints about people that have profiles on adult websites. Here is a page where the solution has been implemented https://cyberbullyingreport.com/bully/predators-watch-owner-scott-breitenstein-of-dayton-ohio-5463.aspx, the Linkify plugin can be found at https://soapbox.github.io/linkifyjs/, and the custom jQuery is as follows: jQuery(document).ready(function ($) { 2 $('p').linkify({ tagName: 'span', attributes: { rel: 'nofollow' }, formatHref: function (href) { href = 'https://cyberbullyingreport.com/redirect/?url=' + href; return href; }, events:{ click: function (e) { var href = $(this).attr('href'); window.location.href = href; } } }); 3 });
White Hat / Black Hat SEO | | STDCarriers0 -
I want to rank with this page http://www.servicesarab.com/%D9%86%D9%82%D9%84-%D8%B9%D9%81%D8%B4-%D8%A7%D9%84%D9%83%D9%88%D9%8A%D8%AA/
i want to rank with this page http://www.servicesarab.com/%D9%86%D9%82%D9%84-%D8%B9%D9%81%D8%B4-%D8%A7%D9%84%D9%83%D9%88%D9%8A%D8%AA/
White Hat / Black Hat SEO | | saharali150 -
Active, Old Large site with SEO issues... Fix or Rebuild?
Looking for opinions and guidance here. Would sincerely appreciate help. I started a site long, long ago (1996 to be exact) focused on travel in the US. The site did very well in the search results up until panda as I built it off templates using public databases to fill in the blanks where I didn't have curated content. The site currently indexes around 310,000 pages. I haven't been actively working on the site for years and while user content has kept things somewhat current, I am jumping back into this site as it provides income for my parents (who are retired). My questions is this. Will it be easier to track through all my issues and repair, or rebuild as a new site so I can insure everything is in order with today's SEO? and bonus points for this answer ... how do you handle 301 redirects for thousands of incoming links 😕 Some info to help: CURRENTLY DA is in the low 40s some pages still rank on first page of SERPs (long-tail mainly) urls are dynamic (I have built multiple versions through the years and the last major overhaul was prior to CMS popularity for this size of site) domain is short (4 letters) but not really what I want at this point Lots of original content, but oddly that content has been copied by other sites through the years WHAT I WANT TO DO get into a CMS so that anyone can add/curate content without needing tech knowledge change to a more relevant domain (I have a different vision) remove old, boilerplate content, but keep original
White Hat / Black Hat SEO | | Millibit1 -
Url suddenlly diappeared from Google search results
Hi, I am facing a big problem wheel Google stop showing a basic url of my site, It was ranked good for more than 35 keywords from 1st to 8st positions, and suddenly I can find it indexed in Google , this is the URL : http://tv1.alarab.com/view-8/مسلسلات-عربية Thnaks
White Hat / Black Hat SEO | | alarab.net0 -
Analytics Spammer Can Haz Humors: Who Else?
Yeah... the traffic is annoying. But seeing this (attached image) in my GA was pretty funny. Obviously it was only a couple hits. I thought it was pretty cute in comparison to the other actions. 1WnZK0p
White Hat / Black Hat SEO | | Travis_Bailey2 -
Has anyone used tribepro.com
Does that concept really work. Any experience? I've registered and so far I think it's hard to measure whether the shares are spam or genuine. Would love to see it works for someoneThanks
White Hat / Black Hat SEO | | LauraHT0 -
Can you use the image description for IMG ALT?
ello ello! We're running an ecommerce site with thousands of products. None of the product pages have an IMG ALT. We're been thinking about an IMG ALT rule to apply to all product page images. Every image currently has a detailed caption so the thought was, why don't we use the description as the IMG ALT? It's perfect as it explains the image. Now the thing is, the length of the description, some of them come to 150 - 200 characters with spaces. Do you think this is too much? Also, would having a caption and the IMG ALT be the same cause issues? Have you guys employed any rules for IMG ALT in a bulk way?
White Hat / Black Hat SEO | | Bio-RadAbs0 -
Redirects/What to do with multi domains for the same company?
What is the correct way to "redirect" a domain if you have multi domain names for the same site? For example if a company has www.mysite.com www.mysite.info www.mysite.tv www.mysite+location.com Say my website lived at this location www.mysite.com would I then just forward the other domains to the same place? Do search engines penilize for this? Do search engines view this as duplicated content? Is it even worth having these domains and making the active? Thanks in advance!
White Hat / Black Hat SEO | | christinarule0