All pages get 301 on direct access
See original GitHub issueDescription
I have published very basic website to old fashion FTP server. The website is accessible at http://www.septictankdisposal.ie
All works as expected and I’m very happy that I have used Gridsome for this project because it’s really fantastic tool. However after doing technical audit to the website I have discovered that all pages are being 301 redirected and this is really bad for SEO. I’m not sure how to resolve this issue and if the issue is caused by my self and the incorrect use of Gridsome.
Steps to reproduce
When any page is accessed by clicking main menu or any internal link pointing to that page it works fine. For example: when I open the website in browser and on home page and I click in main menu on link contact, it will open url “http://www.septictankdisposal.ie/contact”
But If I try to access directly this page by submitting in browser the same url “http://www.septictankdisposal.ie/contact” I will be 301 redirected to “http://www.septictankdisposal.ie/contact/”
Expected result
The pages are suppose to have only one accessible url
Actual result
Pages are accessible on 2 different urls and on direct access all pages response is 301
Environment
Libs:
- gridsome version: 0.5.8
- @gridsome/cli version: 0.0.9
Browser:
- [ ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
For Tooling issues:
- Node version: XX
- Platform:
Others:
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (6 by maintainers)
@robaxelsen I’ll publish a fix for the sitemap plugin later today 😃
@hjvedvik Rather than forcing trailing slashes onto all users, could that be made an option? That way users who operate a web server which can be configured to allow no slashes (for example Apache 2.4 using DirectorySlash/AllowNoSlash) can build sites with no-slash URLs.