Website not working with Custom Domain (Namecheap) #61333
-
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
There are several things that can cause this problem. Here are some steps you can take to try and solve it. Incorrect path to CSS files: Make sure your CSS file paths are correct. Sometimes, relative paths don't work as expected, especially if you're using Jekyll or another site generator. For example, if your stylesheet is located in a /css folder at the root of your repository, you should use the path /css/style.css instead of css/style.css. Base URL configuration: If you're using Jekyll, make sure that the base URL in your _config.yml configuration file is correct. For example, if your GitHub repository is username.github.io/repo, then your base URL should be /repo. Browser cache: Your browser may keep a cached version of your site. Try clearing your browser's cache and reloading the page. HTTPS and mixed content: If your site is served over HTTPS (which is the default with GitHub Pages), but your stylesheets are loaded via HTTP, modern browsers will block the loading of these resources. Make sure all your resources are loaded via HTTPS. Code inspection and browser console: Use your browser's code inspection tool to check for errors related to the loading of your stylesheets. You can usually access this tool by right-clicking on your page and choosing "Inspect" or "Inspect element". Go to the "Console" tab to view the errors. |
Beta Was this translation helpful? Give feedback.
There are several things that can cause this problem. Here are some steps you can take to try and solve it.
Incorrect path to CSS files: Make sure your CSS file paths are correct. Sometimes, relative paths don't work as expected, especially if you're using Jekyll or another site generator. For example, if your stylesheet is located in a /css folder at the root of your repository, you should use the path /css/style.css instead of css/style.css.
Base URL configuration: If you're using Jekyll, make sure that the base URL in your _config.yml configuration file is correct. For example, if your GitHub repository is username.github.io/repo, then your base URL should be /repo.
Browser cache: Your…