How to not show fly.io domain on google search
Is there anyone that knows a way such that the fly.io domain is not shown in a google search? i have setup my custom domain..
4 Replies
Hi @Sven. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
To prevent your fly.io domain from showing up in Google search results while using your custom domain with a Wasp app, you need to take a few specific steps:
1. Make sure your custom domain is properly set up with Fly.io. Based on the knowledge sources, you should have already:
- Added your domain to your Fly client app
- Added the proper DNS records (A and AAAA)
- Set your custom domain as the
WASP_WEB_CLIENT_URL
environment variable for your server app
Deploying with the Wasp CLI
2. To prevent the fly.io domain from appearing in search results, you should:
- Make sure all your internal links use your custom domain, not the fly.io domain
- Set up proper redirects from the fly.io domain to your custom domain
- Consider adding canonical URL tags in your HTML head to indicate your custom domain is the preferred URL
While the knowledge sources don't specifically address hiding the fly.io domain from Google search results, these are standard SEO practices that should help. You might also want to consider:
- Using Google Search Console to request removal of the fly.io URLs
- Setting up robots.txt on the fly.io domain to discourage crawling
If you're using the OpenSaaS template, you might find additional SEO capabilities there, as mentioned by a community member who had success with Google search rankings even without a dedicated landing page: "A lot of hype around needing SSR for good SEO is exaggerated" and Wasp allows you to add OG tags in the head
property of the main.wasp
file.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @Sven, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist:
Perhaps try again in 15mins?@Sven hello, the bot is right, setting up DNS and Canonical URL right should solve the problem for you. Let us know if you have any questions.
To directly eliminate the root of the problem you can create a small redirection middleware:
And as Franjo has said, add Canonical as well.
what does this do? i already have some redirect when people come on my fly.io domain or is this somethig different?
how do i properly implement this in my code?
also i do not understand how i do that Canonical part....
could you dm me @NEROX