Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search not working on custom domain #456

Open
bytadit opened this issue Nov 13, 2021 · 5 comments
Open

Search not working on custom domain #456

bytadit opened this issue Nov 13, 2021 · 5 comments

Comments

@bytadit
Copy link

bytadit commented Nov 13, 2021

Hello, thank you for making this great theme
But, I've problem with my website (https://bytadit.com) which is not showing content highlight when typing some words on search.
Screenshot from 2021-11-13 11-04-03
I inspected its element and got some error messages :
Screenshot from 2021-11-13 11-03-40
According to correlated issue i found here (#214), i have a solution to change my baseURL in config.toml from https://bytadit.com into https://bytadit.netlify.app (because i hosted on netlify), and it works!!.
Screenshot from 2021-11-13 13-17-31
But i faced another problem, my address bar is always change to https://bytadit.netlify.app, even i type bytadit.com. I want it stayed to my custom domain (bytadit.com), not netlify domain. I know it's because of the changed baseURL, but if i change the baseURL to my own domain (like before), the search doesn't work again. What should i do to solve that?

@BeTheCodeWithYou
Copy link

@bytadit Just checking, if you have found a solution to this?
I have same issue for my site, search works on local but not on custom domain.
I have looked at this search issue 214 and all of it's comments but not helpful.

@zzossi If you could help on this, would be great. Thanks.

@BeTheCodeWithYou
Copy link

BeTheCodeWithYou commented Jan 2, 2023

I have resolved the search function for my site https://www.neerajsidhaye.com
I had same issue of CORS. I have custom domain on AWS Route 53 and was using AWS Amplify for build and publishing.

Now, my site live using GitHub Pages and using GitHub Actions for build, deploy and publishing as soon I commit.
I am still using custom domain on AWS Route 53.

I think, moving to github pages and adding a CNAME entry into the DNS ( route 53 ) , has resolved the CORS error and eventually the search.

@sysadmin-info
Copy link

I have resolved the search function for my site https://www.neerajsidhaye.com
I had same issue of CORS. I have custom domain on AWS Route 53 and was using AWS Amplify for build and publishing.

Now, my site live using GitHub Pages and using GitHub Actions for build, deploy and publishing as soon I commit.
I am still using custom domain on AWS Route 53.

I think, moving to github pages and adding a CNAME entry into the DNS ( route 53 ) , has resolved the CORS error and eventually the search.

Hi,

Can you provide an example of the CNAME? I am familiar with it, however I would like to know the pattern. You do not have to provide a real domain name it can be example.com and how the CNAME record should look like. I suppose it will be different for Cloudflare, AWS, Google Cloud etc.

@Thien1n
Copy link

Thien1n commented Apr 15, 2024

Hi @sysadmin-info
I just visited your site [https://sysadmin-info.netlify.app/en/]
It seems to be there is still an issue regarding to "search" function.
I have fixed it by entering the value of [CNAME/Custom domain] into the BaseURL on config.toml file instead the "abczyx.github.io"
That means the correct will be BaseURL = "https://sysadmin-info.netlify.app/", let's try it on your side
You can visit here to take the explanation: #241

@sysadmin-info
Copy link

sysadmin-info commented Apr 16, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants