I have a mass page site with many URLs indexed in Google. I'd like to run a test for a couple weeks where I redirect all the traffic to another URL.
2 Questions:
Which htaccess code would you use to do this redirect? 302 redirect?
Would redirecting the traffic still cause high disk usage on my servers?
Related
I have two domains - https://hosting.opensimcity.org, and http://paradigm.pocketmud.com and I want to redirect the latter to the former. That is, when someone connects to http://paradigm.pocketmud.com I want it to redirect to https://hosting.opensimcity.org/paradigm
Any tips on doing this in my .htaccess file?
Just try the following htaccess redirect code:
Redirect 301 / https://hosting.opensimcity.org/paradigm
This 301 redirect response notifies the search engines that the page has moved permanently from the old URL to the new URL. The search engines also transfer the old URL page rank to the new URL.
I've got a tricky situation where four different websites are now merging into a single site. I'm trying to figure out the best way to handle 301 redirects for old URLs from these sites.
Here's an example for illustration. Say I have these four sites:
https://red.com
https://blue.com
https://green.com
https://magenta.com
And they're all now going to be living just at https://red.com.
Each of these sites had a "Team" page...
https://red.com/team/
https://blue.com/team/
etc.
Once I've pointed all the URLs to the same place, I'd like to see if someone tried to enter one of the previous URLs, and direct them to a specific new place on the site, e.g.:
URL Entered: https://blue.com/team/
301 Redirect: https://red.com/blue/team/
URL Entered: https://green.com/team/
301 Redirect: https://red.com/green/team/
etc.
Since folks may be coming from multiple different domains, I can't use standard relative 301 redirects in .htaccess for this. I'd like to just be able to point the DNS for these other domains to go straight to red.com, and then handle the 301 redirect logic there.
Any ideas on how to handle this?
You can simply use 302 temporary redirect rather than using 301 which is permanent.
** Also don't forget to clear previous 301 redirection caches on your web browser; if used.
I’m having some real problems with 301 redirects in my .htaccess file.
I have about 20 pages on an old site that I need to redirect to pages on a new site. The URL structure of the new site is totally different.
Here’s one that I tried:
Redirect 301 /dan-carr-gear-list/travel-gear https://dancarrphotography.com/gear/travel/
Unfortunately, this doesn’t work.
What happens is that you get redirected to https://dancarrphotography.com/gear/travel-gear/ for some reason.
I just can’t figure it out.
I currently have my Online Store as a Sub-Domain of my main site and my host is having all sorts of trouble getting the "wildcard" ssl certificate to work with the redirects and the CDN.
I am considering just moving the store to a sub-directory of the main site to rid us of the wildcard ssl.
My concern is that the Search Engines have the Store indexed as https://store.xxxxxxxx.com. When the wildcard ssl is gone and the sub-domain is no longer https how do I go about redirecting from the Sub-Domain to the new Sub-Directory.
Thanks
You can use Redirect in your .htaccess to redirect the user. This will require you to keep the subdomain operational.
Redirect 301 / http://example.com/store/
The 301 is a permanent redirect. Search engines are usually smart enough to index this result permanently.
I recommend you also notify the search engines with your changes to speed up the process. This process is different for each search engine.
I have a site with thousands of pages that need to be redirected. I was thinking of using a 301 redirect in my .htaccess, but I'm just afraid that this will be very inefficient.
Would having a .htaccess with thousands of lines (there is no way to have a re-write rule, they have to be mapped one by one), mean that every time someone accesses one of our pages, they have to read the entire .htaccess? Is that a bad thing? This sit is in a shared host.
I saw a previous answer here about using RewriteMap. How is that different than having the 301 redirects?
Thanks
For simple page redirects 301 is the best and it's very fast. RewriteMap is for more complex rewrite functions or doing very specific rewrite tasks.
Before black listing your pages server side, I would try remapping with your application first.
If you set up the redirect with .htaccess those pages will be dead to Google which of course may or may not be a bad thing. Basically once Google indexes those redirects there really is no going back (SEO).
In short redirect wisely.