Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 843737
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T06:10:35+00:00 2026-05-15T06:10:35+00:00

How can one easily test HTTP return codes, like, say, a 301 redirect? For

  • 0

How can one easily test HTTP return codes, like, say, a 301 redirect?

For example, if I want to “see what’s going on”, I can use telnet to do something like this:

… $ telnet nytimes.com 80

Trying 199.239.136.200...
Connected to nytimes.com.
Escape character is '^]'.

GET / HTTP/1.0

(enter)

(enter)

HTTP/1.1 200 OK
Server: Sun-ONE-Web-Server/6.1
Date: Mon, 14 Jun 2010 12:18:04 GMT
Content-type: text/html
Set-cookie: RMID=007af83f42dd4c161dfcce7d; expires=Tuesday, 14-Jun-2011 12:18:04 GMT; path=/; domain=.nytimes.com
Set-cookie: adxcs=-; path=/; domain=.nytimes.com
Set-cookie: adxcs=-; path=/; domain=.nytimes.com
Set-cookie: adxcs=-; path=/; domain=.nytimes.com
Expires: Thu, 01 Dec 1994 16:00:00 GMT
Cache-control: no-cache
Pragma: no-cache
Connection: close

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>    
<head>      
...

Which is an easy way to access quite some infos.

But now I want to test that a 301 redirect is indeed a 301 redirect.

How can I do so?

Basically, instead of getting a HTTP/1.1 200 OK I’d like to know how I can get the 301?

I know that I can enter the name of the URL in a browser and “see” that I’m redirected, but I’d like to know what tool(s) can be used to actually really “see” the 301 redirect.

Btw, I did test with a telnet, but when I enter http://www.example.org, which I redirected to example.org (without the www), all I can see is an “200 OK”, I don’t get to see the 301.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T06:10:36+00:00Added an answer on May 15, 2026 at 6:10 am

    OK, two minutes after answering the question I found the answer…

    Doing the following doesn’t work:

    telnet www.example.org 80
    GET / HTTP/1.0
    {enter}
    {enter}
    

    But the following works fine:

    telnet example.org 80
    GET / HTTP/1.0
    Host: www.example.org
    {enter}
    {enter}
    

    My error was to pass http://www.example.org to telnet (instead of example.org) and then not specifying any “Host: “.

    Now it works, I get this:

    Connected to xxx.xx
    Escape character is '^]'.
    GET / HTTP/1.0
    Host: www.example.org
    
    HTTP/1.1 301 Moved Permanently
    Server: Apache-Coyote/1.1
    Location: http://example.org/
    Connection: close
    Date: Mon, 14 Jun 2010 13:02:22 GMT
    Connection: close
    
    Connection closed by foreign host.
    

    Note: On Windows Vista/7, Telnet Client is not installed by default. To install it, follow the directions here: Install Telnet Client – Microsoft TechNet

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 428k
  • Answers 428k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I'm not sure what you're asking. My guess is that… May 15, 2026 at 1:20 pm
  • Editorial Team
    Editorial Team added an answer WM_MOUSEHWHEEL is sent to the active window when the mouse's… May 15, 2026 at 1:20 pm
  • Editorial Team
    Editorial Team added an answer Your question is not very clear, however as far as… May 15, 2026 at 1:19 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.