trailing backslashes

  • 0
  • 1
  • Question
  • Updated 6 years ago
Archived and Closed

This conversation is no longer open for comments or replies and is no longer visible to community members.

how do i add a trailing backslash to the URL for a page on my website and still have that URL work if someone enters in the web address without the trailing backslash?
Photo of Bill5099

Bill5099

  • 3,144 Points 3k badge 2x thumb

Posted 6 years ago

  • 0
  • 1
Photo of Mike F.

Mike F., Alum

  • 184,678 Points 100k badge 2x thumb
You don't have to do anything for the backslash to work, you can enter just the domain name, or the domain followed by the backslash and the site will come up.

http://www.thecrickethillcompany.com
http://www.thecrickethillcompany.com/

Mike
Photo of Bill5099

Bill5099

  • 3,144 Points 3k badge 2x thumb
thanks Mike- but i was referring to an internal page, not the home page. that is, one with a .html extension. here's why:

i placed an online ad with the Wall St Journal. the links they were generating in the online ad were automatically generating a trailing backslash after the url. (thecrickethillcompany.com/tanglwood.html/) this essentially rendered the page non-functional.

my solution in the wee hours this morning was to create a hidden to the public redirect page thecrickethillcompany.com/wsjredirect.html by using the redirect script from your help section. this made it so that a visitor clicking on that link from WSJ, even with a trailing backslash added to the URL, would get redirected within seconds to the tanglwood page totally functional.

turns out they too corrected their links without the trailing backslash in the middle of the night. so either way, i'm now good to go but learned something in the process about these html extensions.

thanks anyway. unless of course you have some other bright ideas.
Photo of Mike F.

Mike F., Alum

  • 184,678 Points 100k badge 2x thumb
There should not be a "/" following any html extension, which I'm sure is why they corrected it. That would produce an invalid url. It's always a good idea to avoid redirects when you can as the search engines frown on that practice. If it's working now, I would leave it alone.

Mike
Photo of Bill5099

Bill5099

  • 3,144 Points 3k badge 2x thumb
precisely what i realized after i posted the original question. but my solution worked and did not actually produce an invalid url-it redirected visitors to the correct fully functional page. try it with the backslash: thecrickethillcompany.com/wsjredirect.html/ see?
Photo of Mike F.

Mike F., Alum

  • 184,678 Points 100k badge 2x thumb
Yes, your solution would really be the only work-around that I can think of. That would have been my suggestion so that they don't get a "page not found" error. Are there any ads that made it out which do include the "/" ? If so I would leave the redirect, at least for a while, but if not, then I would recommend getting rid of it so Google doesn't penalize you.
Photo of Bill5099

Bill5099

  • 3,144 Points 3k badge 2x thumb
i'm not worried about Google penalizing me. but no, the WSJ folks are the only peeps that were using the backslash and i'm just going to leave it that way and just for them. good to know i have that solution for the future though. thx for the help.
Photo of Mike F.

Mike F., Alum

  • 184,678 Points 100k badge 2x thumb
You're welcome!

This conversation is no longer open for comments or replies.