Return Page showing up on Google Searches

Today I received an email to my premium address, which is not divulged publicly but only to my paying subscribers. Then, to my surprise, I googled the email address and my return page is showing up on searches.

Is there anything I need to do (or that I perhaps did incorrectly) to block that from happening? I won’t paste the entire address here, but my domain is thesimarchitect dot com.

To be honest, that page should not even be visible if the user seeing it didn’t just finish a subscription. :worried:

Thanks!

Just a quick update. Even though the problem persists, this is my temporary workaround (hopefully it works):

On the Auto Return Page Template (optional customizations) under PayPal Options I added this to the Auto Return Page Template Header (first line):

<meta name="robots" content="noindex, nofollow">

I also added this to my robots.txt file (not sure it works, since the address is a query, I tried to set up a redirect on NGinx but I wasn’t successful and it seems to be quite complex to code a redirect properly, so only requests to that specific page without coming from a purchase/subscription are redirected):

Disallow: /?s2member_paypal_return=1

And, on top of that, just in case, I also made a request for google to not feature that url on search results, and I’ll do the same with Bing and Yandex.

Is it possible to include a redirect for when someone (human or robot) visits /?s2member_paypal_return=1 without a query originated from a purchase or subscription on a future plugin update?

I have a strong feeling that my SEO plugin is partially culprit from what happens (RankMath) and I also reached out to them about the issue.

Thanks again for everything!

Hi Sim.

I think your solution with the robots file was fine.

The problem with the return page, is that it has to be public, because the customer is not yet logged in. Restricting access to the page would prevent the customer from seeing after payment.

Another possible solution would be to have a conditional on the page that checks for a variable that is only present after checkout, and show the content only in that case.

1 Like

Yes, it would be nice if the page without additional parameters redirected somewhere else, so it can only be seen if the user is coming from a payment processor (pages from a checkout also have product or subscription parameters in the end, even your testing version has additional parameters in the address).

Another possible solution would be to have a conditional on the page that checks for a variable that is only present after checkout, and show the content only in that case.

I love your idea, that would be perfect. Is it to hard for me to implement or is it something that would have to be added to your plugin on a later date?

Thanks anyways! At least it won’t be featured on searches anymore, and I temporarily removed my email address from there, until I figure a better way around it :grin:

It wouldn’t be fun to have robots (malicious ones) scraping my email address…

Well, with a conditional you could at least check for $_GET['s2member_paypal_return'] being set before showing the content. They would need to have it in the URL to see the content. You could try something like this:

[s2If php="empty($_GET['s2member_paypal_return'])"]
<script>window.location.replace("http://yoursite.com");</script>
[else]
Thank you for your purchase! ...
[/s2If]

See WP Admin > s2Member > Restriction Options > Simple Shortcode Conditionals > Allow PHP

:slight_smile:

1 Like

OMG! Awesome! Thank you so very much! It works perfectly!!!

Just a quick note, the preview will redirect now, but it’s all good, I can always remove that clause temporarily if I am testing things around. I tested a return link from my Google Analytics history that had IPN data and it worked as expected.

Great! :slight_smile:

the preview will redirect now, but it’s all good

You can add that to the check too, e.g.:

[s2If php="empty($_GET['s2member_paypal_return']) && empty($_GET['preview'])"]
<script>window.location.replace("http://yoursite.com");</script>
[else]
Thank you for your purchase! ...
[/s2If]
1 Like

Thanks! Didn’t work, though.

?s2member_paypal_return=1&s2member_paypal_proxy=paypal&s2member_paypal_proxy_use=x-preview is the query that normally shows the preview :wink:

I thought you meant WordPress’ page editing preview. :slight_smile:

1 Like

Sorry.

1 Like