Questions tagged [301-redirect]

301 is the HTTP status code for a permanent redirect.

Filter by
Sorted by
Tagged with
5
votes
2answers
2k views

redirecting https to http

RewriteEngine on RewriteCond %{SERVER_PORT} ^443$ RewriteRule ^(.*)$ http://%{HTTP_HOST}/$1 [R=301] # WordPress Defaults RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} ...
5
votes
4answers
9k views

Finding what is causing my site to issue 301 redirects

I have an URL which is 301 redirecting but I cannot find where or how it is happening and wanted some checks to perform if possible? I've checked .htaccess - it's not there I've checked cPanel in ...
5
votes
1answer
15k views

Help with 301 redirect from subdomain to root domain

I need to forward existing subdomain links to the root domain as the subdomain no longer exists. I have tried so many different lines of code in my .htaccess file and can not get the redirect to work. ...
5
votes
1answer
887 views

Execution order of different htaccess redirects

It seems that no matter what I search I just can't understand why I keep getting this issue and I for some reason can't find a good explanation on how it works. Also sorry if this quest was asked ...
5
votes
1answer
3k views

How to do a cacheable redirection?

When users enter my website example.com, their "preferred" language is detected and they are redirected (using a 301 Moved Permanently redirection) to example.com/en/ (for English), example.com/it/ (...
5
votes
6answers
8k views

How can I get a list of all indexed pages for my domain?

We're in the process of migrating an outdated e-commerce cart to Magento. Part of this process will entail configuring proper 301 redirects. I'm aiming to get a list of all indexed pages to throw ...
5
votes
4answers
7k views

using .htaccess to redirect .asp to .php?

Ahoy all! I've been racking my brain with this one. I basically just converted all of my pages from ASP code to PHP code. Kept the same filenames. So, here is the htaccess code I have so far, but ...
5
votes
1answer
285 views

Will GoDaddy's domain forwarding affect subdomains?

I have an old domain registered with GoDaddy. Let's say it's olddomain.com. I want olddomain.com and www.olddomain.com to go to www.newdomain.com. The complication is that I have a few subdomains ...
5
votes
1answer
316 views

Is it necessary to add a canonical tag for a static site switching from HTTP to HTTPS if there is already a 301 Redirect?

We have a static site that has thousands of HTML pages and are planning to switch to HTTPS in the next few days. As the site is fairly new, we do not have any problems with duplicate content at the ...
5
votes
1answer
92 views

Wrong URL Requested But I know what they meant - 404 vs canonical vs 301 redirect

I'm using mod_rewrite to process variables in the URL. For many of my URLs the final portion of the string doesn't matter because I'm not using it. For instance: /review/company-25/jb-hunt I'm only ...
5
votes
1answer
602 views

301 and no-index tag don't work

Almost 3 months ago I've put no-index tag to about 3,000 pages on my website and 301 redirect (which is permanent redirect) for almost 15,000 pages. (The all site is about 50,000 pages) And yet as ...
5
votes
3answers
1k views

Getting 301 redirect error in Google Webmaster Tools while using “change address”

So I'm moving my website from one domain to another. In this process I'm using the "change address" function in Google Webmaster Tools on my old-domain.com, "switching" it to / choosing my verified ...
5
votes
1answer
525 views

Google Indexing URL that is a 301 redirect

My website URL structure is: http://www.website.com/{record-type}/{record-id}/{human-readable-name} If an invalid human readable name is provided, the page 301 redirects to the correct URL. I've ...
5
votes
1answer
97 views

Implementing 301 redirects won't work without an existing file. Will that matter to Google or is there a better way to implement redirects?

I just published a completely revised version of a website (static site to a Wordpress powered one) without changing the domain or the web server. In the old site the URL structure was example.com/...
5
votes
1answer
10k views

.htaccess how to redirect the contents of a directory to a subdirectory

I'm trying to redirect the contents of a directory that is placed at the top level of my website, to a subdirectory one level deep. I also need to exclude two files and a folder. Nothing I've tried so ...
5
votes
3answers
252 views

wordpress 301 redirect tag to main page

I have posted previously about wordpress tags and archives and whether it can lead to duplicate content problems, the overwhelming response was NO google is smart enough to realise the difference. ...
5
votes
4answers
124 views

301 Redirects: SEO Credit After Modifications to Redirect

I recently moved www.example1.com to www.example2.com. Initially, for a period of perhaps 1-2 weeks, this move was most likely a redirect from www.example1.com/blah to www.example2.com (go to the ...
5
votes
2answers
133 views

SEO: is it a good practice for 2000 pages to redirect to 20 pages?

My task is to redirect ("301 redirection") 20 groups of 100 pages (2000 pages) with duplicate content to 20 pages in inner blog at the same domain. I know how to do it but is it a good idea from SEO ...
5
votes
1answer
2k views

GSC: How to move a site from a domain to sub domain, sub folder or new domain with a sub folder?

Is it possible to tell Google's Webmaster Tools that our site hosted on www. has moved to a sub folder, sub domain or a new domain with sub folder?
5
votes
2answers
182 views

Index a 301 Redirect to help a user locate a page

On a site I'm currently working on, there is a 301 Redirect to redirect a nice short URL for users to type in when trying to find a particular piece of content - e.g. www.mydomain.com/apply -> www....
5
votes
2answers
2k views

GoDaddy's 301 redirect/forwarding has some weird random middleman URL, kills link juice?

I'm trying to use GoDaddy's 301 redirect, which is named as domain forwarding. I set up forwarding DomainA.example to DomainB.example as 301 "type". I noticed DomainA.example is still indexed in ...
5
votes
2answers
508 views

Properly redirect a site to WWW and HTTPS

I recently found out a problem in .htaccess file in my website. When I started the site I did a 301 redirect to redirect all non-www and http request to www with https. I added this lines of code and ...
5
votes
2answers
520 views

Managing redirections of 2 domains at CloudFlare for the same site

Let's say I have these two domains: example.com.uy example.uy My goal is to set a proper domain's forward according to SEO best practices using a 301 Redirect, in order to enforce my users to be ...
5
votes
1answer
375 views

How to get rid of crawling errors due to the URL Encoded Slashes (%2F) problem in Apache

The Google web crawler has indexed a whole set of URLs with encoded slashes (%2F) for our site. I assume it has picked up the pages from our XML sitemap file. The problem is that the live pages will ...
5
votes
2answers
2k views

How to 301 redirect from old query string URLs to CakePHP Canonical URLs?

I currently have a .htaccess file that looks like this: RewriteCond %{QUERY_STRING} ^action=view&item=([0-9]+)$ RewriteRule ^index\.php$ /index.php?url=item/%1 [R=301] RewriteCond %{...
5
votes
1answer
3k views

How to redirect a Heroku domain to a custom domain?

Let's say my web can be accessed with www.example.com and example.herokuapp.com. How can I redirect example.herokuapp.com/* to www.example.com/*? Heroku suggests that I use HTTP status 301 Moved ...
5
votes
2answers
2k views

301 Redirect Causes Insecure Connection Warning

My client's primary domain name is a variant of a commonly spelled name, for example domein.com. To avoid losing traffic, they also purchased domain.com. The live site is at https://domein.com. When I ...
5
votes
1answer
483 views

301 redirect away from content that is served with a reverse proxy to prevent duplicate content

I am currently struggling to resolve an issue stemming from a reverse proxy. We are running a reverse proxy from page.example.com to example.com/page/ . This original subdomain content is generated ...
5
votes
1answer
271 views

Using an old penalized domain for a new website

I had a website with 2 domains like these: firstdomain.com and first-domain.com. The main domain was first-domain.com and the other one was 301 redirected to first one. The main domain got a Google ...
5
votes
2answers
744 views

Website on S3: Multiple subdomains to one Bucket?

I'd like to host a website on Amazon S3. What's the best practice to make a site accessible from both example.com and www.example.com?
4
votes
4answers
2k views

Can I reuse a URL after it's used for a 301 redirect?

Is it possible to 301 redirect a page and then reuse the redirected URL again in the future? What are the disadvantages of using the old link? For example: www.example.com/contact 301 redirect to ...
4
votes
2answers
5k views

Difference between “/” at end of URL and without “/” [duplicate]

Possible Duplicate: Does it make a difference if your url ends in a trailing slash or not? Why treat these as different URLs? I am doing a 301 redirect in my WP application using .htaccess and ...
4
votes
3answers
3k views

Subfolder won't permenantly redirect to subdomain

Right now I have the following code to redirect all non-www URLs to www URLs: RewriteCond %{HTTP_HOST} ^example.com RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L] Besides that redirection, I ...
4
votes
3answers
773 views

Which is more SEO friendly, redirect or rewrite?

On Apache 2.4, which is better for multiple migrated URLs in terms of SEO, 301 redirect or rewrite? I have ~50 URLs.
4
votes
3answers
2k views

Googlebot robots.txt access error on HTTPS when redirected from HTTP

This might be a stupid question, but I never came across this issue before and were not able to find any definite answers to this on the web: Our client migrated to HTTPS a few months ago, using ...
4
votes
2answers
2k views

301 Redirect in the body?

This may be a silly question, but if I only have access to edit a website through a CMS, and can't touch the headers, is there a way to redirect the page without prompting the user to click a link?
4
votes
2answers
454 views

Using 301 redirects to change domain and maintain SEO

I’m setting up a Wordpress website with a new domain name to replace my client’s current website. I’d like to redirect the old domain to the new domain in a way that will maintain the search engine ...
4
votes
2answers
117 views

301 redirect or canonical

I'm launching version 2 of my site. It has a new url structure, but largely the same contents. I have around 500+ content pages that gets affected. This is a custom build and I have no technical ...
4
votes
3answers
1k views

Remove extension from URL using a rewrite without resulting in a redirect loop

On the server, I have a file (on the filesystem) called page.html, which I want to be accessed as site.com/page So if someone goes to site.com/page.html, it should 301 redirect to site.com/page I've ...
4
votes
1answer
90 views

Is there any difference, from Google's point of view, on the method used for a 301 redirect?

I have a website with an extremely good Google rank for it's particular niche. I've rebranded and need to redirect to a new URL. In the eyes of Google, what's the difference, if any, between the ...
4
votes
1answer
65 views

Does having a lot of 301 redirects noticably impact performance?

I just moved my website to Wordpress from another service. Unfortunately, this means that although I was able to import all of my previous content to Wordpress, the post permalinks are now entirely ...
4
votes
2answers
700 views

Changing 301 redirect multiple times

Let's say I am a mortgage broker that has an entire neighborhood of houses to sell. I sell one of the houses, call it House A. For whatever reason, House A has great SEO, while the rest do not rank ...
4
votes
2answers
100 views

Difference between 301 and 303 status codes

What is the difference between 301 Moved Permanently and 303 See Other status codes? Both are used for redirects. There is some detailed info on the 303 at https://en.wikipedia.org/wiki/HTTP_303, ...
4
votes
1answer
521 views

Redirect 301 directive for Apache has no effect for URL with query string

I have this old link http://www.example.com/?page_id=617/ that I want to redirect to the home page. I've tried to implement this redirect with: Redirect 301 /?page_id=617/ https://www.example.com/ ...
4
votes
1answer
121 views

How can I programmatically redirect to new pages when users change content and the URL slug changes?

I have a PHP website, that has content posted by the administrator, and content posted by loggedin users. I use a content slug in URLs. If a user changes his post the corresponding slug may changes ...
4
votes
1answer
591 views

Redirect all index.html pages to subdirectory?

I have an old site ported from WordPress to basic HTML (don't ask why) and every page is ending in the subdirectory/index.html. This is causing some funky indexing issues, so I wanted to 301 all the ...
4
votes
3answers
647 views

301 redirects for /blog to blog subdomain not working

I just created a new subdomain for my blog so blog.example.com - it used to be www.example.com/blog so I am now trying to write 301 redirects from all my old /blog posts to the new blog.example.com ...
4
votes
1answer
159 views

How do I handle a LOT of redirects when migrating a medium sized site?

I'm migrating a medium-sized site (12,000 pieces of content) from Static HTML to a CMS. The CMS effectively requires that the exiting site structure has to change. The site has more than 5,000 PDFs ...
4
votes
1answer
125 views

Moving folder's content to a new domain, what SEO steps to take?

So, we have a functionality on example.com/folder that we decided to make as separate site and we're in need of moving it to a new domain (brand it)... This is what I'm going to make SEO wise (...
4
votes
2answers
402 views

non-cachable Canonical redirect of www to non-www

I know this question is debatable for the whole eternity, and most likely nobody knows the real philosophy of this problem. But I'm trying to solve the problem about 301 and 302 response headers in ...