question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

All pages get 301 on direct access

See original GitHub issue

Description

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:closed
  • Created 4 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
hjvedvikcommented, May 27, 2019

@robaxelsen I’ll publish a fix for the sitemap plugin later today 😃

2reactions
hwmaiercommented, Jun 7, 2019

@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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

301 Redirects for SEO: Everything You Need to Know - Ahrefs
A 301 redirect indicates the permanent moving of a web page from one location to another. The 301 part refers to the HTTP...
Read more >
How to Set Up a 301 Redirect in .htaccess - InMotion Hosting
Set Up 301 Redirect in cPanel · Login to cPanel. · Click the Redirects button in the Domains section. · You will then...
Read more >
Guide to 301 Redirects with an .htaccess File - Semrush
A 301 redirect is a permanent redirect. When a user tries to access an old URL, the server sends their browser the 301-Permanently...
Read more >
Beginner's Guide to Creating 301 Redirects in WordPress ...
In this beginner's guide, we will focus on 301 redirects since they are the most important type. They tell the browser that the...
Read more >
What is a 301 Redirect, and When Should You Use One?
A 301 signals a permanent redirect from one URL to another, meaning all users that request an old URL will be automatically sent...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found