Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

301 redirect vs reverse proxy which is better for SEO

Avatar

Level 3
I was working on website movement from HTTP to HTTPS
 
So I was aware that I can write the 301 redirect rule in AEM instance.
 
But was exploring option if this could be done using reverse proxy, or if  possible
I can add dispatcher rule that could support 301 redirect.
 
 
 
Please if you could suggest which is better reverse proxy or 301 redirect for SEO
1 Accepted Solution

Avatar

Correct answer by
Level 8

For HTTP to HTTPS a reverse proxy really isn't an option - you have no choice but to do s 301 redirect. You need the browser to make the HTTPS connection - with a reverse proxy the browser would still think it was on a unencrypted page - all you'd be doing is establishing ad SSL connection between you reverse proxy and your web server (which are probably the same boxes).  

In case of a normal redirect from old URL to a new one I'd tend to agree that a reverse proxy is overkill. You lose some page rack which you gain back sooner or later, and save yourself endless operational headaches that would come with maintaining the reverse proxy mappings. 

View solution in original post

5 Replies

Avatar

Correct answer by
Level 8

For HTTP to HTTPS a reverse proxy really isn't an option - you have no choice but to do s 301 redirect. You need the browser to make the HTTPS connection - with a reverse proxy the browser would still think it was on a unencrypted page - all you'd be doing is establishing ad SSL connection between you reverse proxy and your web server (which are probably the same boxes).  

In case of a normal redirect from old URL to a new one I'd tend to agree that a reverse proxy is overkill. You lose some page rack which you gain back sooner or later, and save yourself endless operational headaches that would come with maintaining the reverse proxy mappings. 

Avatar

Community Advisor

In general, you would use a reverse proxy if you had content on a remote server and the easiest way to make user feel as if content is coming from one single server is using reverse proxy. I don't see that's the case here, also reverse proxy eats up more network bandwidth as compared to 301 redirects.

Also In your case eventually you will need search engines to crawl up and index https. Serving a 301 indicates to both browsers and search engine bots that the page has moved permanently. Search engines interpret this to mean that not only has the page changed location, but has also been updated and updated page/content can be found at the new URL. The engines will carry any link weighting from the original page to the new URL.

So I would suggest go with 301 redirects.

- Runal

Avatar

Level 3

 Thanks for inputs.I still  have few questions

I have system that is configured as below

[browser]->   [Apache reverse proxy] -> [Apache  AEM webserver]. 

  • So if  we don't do any redirect [http to https]. Then any user hitting the url with http will still get http protocol response on the browser which pass via reverse proxy server.
  • If i add 301 redirect rule in say reverse proxy server ,then when user hits the url with http then it will do a redirect to 301  https to browser , again  from the user browser the https comes back to reverse proxy and then after processing gives the https based response.-

QUESTIONS:-

  1. so my confusion is any way both are done are the same proxy server  ,then what are we comparing as [reverse proxy and 301 redirect is better]. My understanding is that reverse proxy does not do any things just passing what ever we give it.

      2. Now for doing a 301 redirect at reverse  proxy server

2.a  Can I use http://wiki.apache.org/httpd/RedirectSSL  where they have suggested use Using virtual hosts (using redirect) instead of mod_rewrite as suggested.

  2.b But i don't see any snippet about  301 rule in  Using virtual hosts (using redirect) .Could some one help me on this??

Avatar

Level 3

Any inputs on the query I had below??