Reverse proxy with Shopify

DennisJ
Shopify Partner
13 0 2

We'd like to be able to setup our own blogging platform alongside our Shopify site, and serve it from a sub-directory for SEO purposes. This would require a reverse proxy (most likely Nginx) to accomplish. I've seen a handful of similar requests in this forum, and the response is frequently that it isn't recommended, and would (may?) trigger the bot detection stuff.

 

Is this still the case? Or is there now a path to accomplish this? If not, is there any work underway / timeline for when it would be possible?

 

It seems that it would be fairly useful to be able to seamlessly leverage multiple platforms in addition to Shopify within a site, and it does seem to be something people have run into before.

MeganD_94
Shopify Partner
73 2 6

For something like this, you should reach out to a Shopify Expert. They would be able to recommend if this should be done and the best way to do it: https://experts.shopify.com/

0 Likes
SergeyRyabenko
New Member
2 0 1

@MeganD_94 you behave like a scam. You put link that looks like a link to https://experts.shopify.com , but it actually lead to a page of exact partner. I reported your comment and will definitely not using services of w3trends agency. 
Also your comment is useless because you don't answer the question. 

kgurung
New Member
1 0 0

Did you figure out any solution for this? We are also thinking of using reverse proxy for our site.

0 Likes
SergeyRyabenko
New Member
2 0 1

@kgurung we got answer from support this is not possible as their anti bot system will not let proxied traffic in. So we had to use subdomain, which works well for us. 

0 Likes
DennisJ
Shopify Partner
13 0 2

@kgurungI was able to setup AWS CloudFront to work like a reverse proxy, similar to the guide here:

https://medium.com/@davidgurevich_11928/cloudfront-as-a-reverse-proxy-fb6a8dcbed96

The idea being that CloudFront will distribute the requests from a large enough pool of servers that it won't trigger bot detection. If you're not using AWS, I assume it might be possible to configure another CDN similarly... It did require a little massaging to get things working correctly, so allow a little time to troubleshoot if you go this route.

0 Likes
taylorsteiger
New Member
2 0 1

@DennisJ Thanks for pointing to that Medium article. Do you have any other details on how to get that configured? I don't see how this strictly forwards traffic from one subfolder in the URL. Thanks in advance!

0 Likes
DennisJ
Shopify Partner
13 0 2

Sure!

Basically you setup a CloudFront distribution with 2 origins (content sources)- 1 for Shopify & 1 for your blog. Mine looks like this:

Origin domain name and path:

blog.{{mysite}}.com (this is setup as a DNS A record to my blog server's IP)

shops.myshopify.com

Then I created behaviors in the distribution to route /blog and /blog/* to the blog origin, and the default behavior routes to the shopify origin. It's almost identical to the first part of this answer: https://serverfault.com/questions/850574/nginx-reverse-proxy-ip-forwarding-for-shopify/987990#987990

This should route the /blog traffic to your blog. Configuring the blog to serve from a subfolder if it's not already is a separate issue.

Hope that helps!

0 Likes
taylorsteiger
New Member
2 0 1

Thank you very much for elaborating!