{"id":21344,"date":"2020-08-17T22:56:44","date_gmt":"2020-08-18T05:56:44","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=21344"},"modified":"2020-12-29T13:08:13","modified_gmt":"2020-12-29T21:08:13","slug":"html-redirect","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/html-redirect\/","title":{"rendered":"How to Perform an HTML Redirect"},"content":{"rendered":"\n<p>There may be times when you need to redirect your web traffic to a new site. There are multiple ways to perform a redirect, usually through the backend, but in this article we cover how to do it using a client side redirect in HTML.<br><\/p>\n\n\n\n<p>This redirect takes place in the head of your HTML document, in a meta tag. The syntax for this redirect gives us the ability to delay before the browser redirects to a new web page.&nbsp;<br><\/p>\n\n\n\n<p>The syntax for for this redirect is as follows:&nbsp;<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>&lt;head&gt; \n    &lt;meta http-equiv=&quot;refresh&quot; content=&quot;&lt;num seconds&gt;; url=&lt;site to redirect to&gt;&quot;&gt; \n&lt;\/head&gt;<\/pre><\/div>\n\n\n\n<p>The http-equiv attribute basically simulates an HTTP response header, which allows for the refresh to happen. The content attribute consists of the num of seconds to delay the refresh in case you want to send a message to a user before the page redirects (i.e. bookmark the new page because the site has moved permanently, site is down temporarily and you\u2019re taking them to another version of site).<br><\/p>\n\n\n\n<p>Remember that time is measured in seconds, but many things in the web development world are measured in milliseconds. If you put 1,000 in as the time for this redirect, you or your client will wait a long while before the page actually redirects.&nbsp;<br><\/p>\n\n\n\n<p>The second half of the content attribute is the URL you will be directing to. This all takes place in the head of the HTML page.&nbsp;<br><\/p>\n\n\n\n<p>Here\u2019s how it looks on an actual HTML document:&nbsp;<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>html&gt;\n&lt;head&gt;\n &lt;head&gt; &lt;meta http-equiv=&quot;refresh&quot; content=&quot;1; url=https:\/\/www.careerkarma.com\/blog\/html&quot;&gt; &lt;\/head&gt;\n &lt;style&gt;\n   body {\n     font-family: 'Roboto';\n     margin: 20px;\n   }\n   p {\n     margin: 0;\n     padding: 0;\n   }\n &lt;\/style&gt;\n \n&lt;\/head&gt;\n &lt;body&gt;\n     You are being redirect to &lt;a rel=&quot;noreferrer noopener&quot; href=&quot;https:\/\/careerkarma.com\/blog\/html&quot;&gt;http:\/\/www.careerkarma.com\/blog\/html.&lt;\/a&gt; Please click this link if not redirected in five seconds\n &lt;\/body&gt;\n&lt;\/html&gt;<\/pre><\/div>\n\n\n\n<p>If you don\u2019t have the ability to use a backend to perform a redirect, definitely take this option into consideration!<\/p>\n","protected":false},"excerpt":{"rendered":"There may be times when you need to redirect your web traffic to a new site. There are multiple ways to perform a redirect, usually through the backend, but in this article we cover how to do it using a client side redirect in HTML. This redirect takes place in the head of your HTML&hellip;","protected":false},"author":77,"featured_media":21345,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[17281],"tags":[],"class_list":{"0":"post-21344","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-html"},"acf":{"post_sub_title":"","sprint_id":"","query_class":"HTML","school_sft":"","parent_sft":"","school_privacy_policy":"","has_review":null,"is_sponser_post":"","is_guest_post":""},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.0 (Yoast SEO v27.0) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Perform an HTML Redirect | Career Karma<\/title>\n<meta name=\"description\" content=\"There are many ways to perform a redirect. Learn how to do one using an HTML meta refresh redirect on Career Karma.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/careerkarma.com\/blog\/html-redirect\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Perform an HTML Redirect\" \/>\n<meta property=\"og:description\" content=\"There are many ways to perform a redirect. Learn how to do one using an HTML meta refresh redirect on Career Karma.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/html-redirect\/\" \/>\n<meta property=\"og:site_name\" content=\"Career Karma\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/facebook.com\/careerkarmaapp\" \/>\n<meta property=\"article:published_time\" content=\"2020-08-18T05:56:44+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-12-29T21:08:13+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/08\/jacob-meves-02kW3r4lS8Y-unsplash.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1020\" \/>\n\t<meta property=\"og:image:height\" content=\"680\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Christina Kopecky\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@career_karma\" \/>\n<meta name=\"twitter:site\" content=\"@career_karma\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Christina Kopecky\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/careerkarma.com\/blog\/html-redirect\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/html-redirect\/\"},\"author\":{\"name\":\"Christina Kopecky\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/ae0cdc4a5d198690d78482646894074e\"},\"headline\":\"How to Perform an HTML Redirect\",\"datePublished\":\"2020-08-18T05:56:44+00:00\",\"dateModified\":\"2020-12-29T21:08:13+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/html-redirect\/\"},\"wordCount\":270,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/html-redirect\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/08\/jacob-meves-02kW3r4lS8Y-unsplash.jpg\",\"articleSection\":[\"HTML\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/careerkarma.com\/blog\/html-redirect\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/careerkarma.com\/blog\/html-redirect\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/html-redirect\/\",\"name\":\"How to Perform an HTML Redirect | Career Karma\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/html-redirect\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/html-redirect\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/08\/jacob-meves-02kW3r4lS8Y-unsplash.jpg\",\"datePublished\":\"2020-08-18T05:56:44+00:00\",\"dateModified\":\"2020-12-29T21:08:13+00:00\",\"author\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/ae0cdc4a5d198690d78482646894074e\"},\"description\":\"There are many ways to perform a redirect. Learn how to do one using an HTML meta refresh redirect on Career Karma.\",\"breadcrumb\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/html-redirect\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/careerkarma.com\/blog\/html-redirect\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/html-redirect\/#primaryimage\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/08\/jacob-meves-02kW3r4lS8Y-unsplash.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/08\/jacob-meves-02kW3r4lS8Y-unsplash.jpg\",\"width\":1020,\"height\":680,\"caption\":\"Greyscale City landscape with traffic signal and detour sign\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/careerkarma.com\/blog\/html-redirect\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\/\/careerkarma.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"HTML\",\"item\":\"https:\/\/careerkarma.com\/blog\/html\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How to Perform an HTML Redirect\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\",\"url\":\"https:\/\/careerkarma.com\/blog\/\",\"name\":\"Career Karma\",\"description\":\"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/careerkarma.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/ae0cdc4a5d198690d78482646894074e\",\"name\":\"Christina Kopecky\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/image-3-150x150.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/image-3-150x150.jpg\",\"caption\":\"Christina Kopecky\"},\"description\":\"Christina is an experienced technical writer, covering topics as diverse as Java, SQL, Python, and web development. She earned her Master of Music in flute performance from the University of Kansas and a bachelor's degree in music with minors in French and mass communication from Southeast Missouri State. Prior to joining the Career Karma team in June 2020, Christina was a teaching assistant, team lead, and section lead at Lambda School, where she led student groups, performed code and project reviews, and debugged problems for students. Christina's technical content is featured frequently in publications like Codecademy, Repl.it, and Educative.\",\"sameAs\":[\"http:\/\/www.linkedin.com\/in\/cmvnk\"],\"url\":\"https:\/\/careerkarma.com\/blog\/author\/christina-kopecky\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Perform an HTML Redirect | Career Karma","description":"There are many ways to perform a redirect. Learn how to do one using an HTML meta refresh redirect on Career Karma.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/careerkarma.com\/blog\/html-redirect\/","og_locale":"en_US","og_type":"article","og_title":"How to Perform an HTML Redirect","og_description":"There are many ways to perform a redirect. Learn how to do one using an HTML meta refresh redirect on Career Karma.","og_url":"https:\/\/careerkarma.com\/blog\/html-redirect\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2020-08-18T05:56:44+00:00","article_modified_time":"2020-12-29T21:08:13+00:00","og_image":[{"width":1020,"height":680,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/08\/jacob-meves-02kW3r4lS8Y-unsplash.jpg","type":"image\/jpeg"}],"author":"Christina Kopecky","twitter_card":"summary_large_image","twitter_creator":"@career_karma","twitter_site":"@career_karma","twitter_misc":{"Written by":"Christina Kopecky","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/careerkarma.com\/blog\/html-redirect\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/html-redirect\/"},"author":{"name":"Christina Kopecky","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/ae0cdc4a5d198690d78482646894074e"},"headline":"How to Perform an HTML Redirect","datePublished":"2020-08-18T05:56:44+00:00","dateModified":"2020-12-29T21:08:13+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/html-redirect\/"},"wordCount":270,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/html-redirect\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/08\/jacob-meves-02kW3r4lS8Y-unsplash.jpg","articleSection":["HTML"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/html-redirect\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/html-redirect\/","url":"https:\/\/careerkarma.com\/blog\/html-redirect\/","name":"How to Perform an HTML Redirect | Career Karma","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/html-redirect\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/html-redirect\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/08\/jacob-meves-02kW3r4lS8Y-unsplash.jpg","datePublished":"2020-08-18T05:56:44+00:00","dateModified":"2020-12-29T21:08:13+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/ae0cdc4a5d198690d78482646894074e"},"description":"There are many ways to perform a redirect. Learn how to do one using an HTML meta refresh redirect on Career Karma.","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/html-redirect\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/html-redirect\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/html-redirect\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/08\/jacob-meves-02kW3r4lS8Y-unsplash.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/08\/jacob-meves-02kW3r4lS8Y-unsplash.jpg","width":1020,"height":680,"caption":"Greyscale City landscape with traffic signal and detour sign"},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/html-redirect\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/careerkarma.com\/blog\/"},{"@type":"ListItem","position":2,"name":"HTML","item":"https:\/\/careerkarma.com\/blog\/html\/"},{"@type":"ListItem","position":3,"name":"How to Perform an HTML Redirect"}]},{"@type":"WebSite","@id":"https:\/\/careerkarma.com\/blog\/#website","url":"https:\/\/careerkarma.com\/blog\/","name":"Career Karma","description":"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/careerkarma.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/ae0cdc4a5d198690d78482646894074e","name":"Christina Kopecky","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/image-3-150x150.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/image-3-150x150.jpg","caption":"Christina Kopecky"},"description":"Christina is an experienced technical writer, covering topics as diverse as Java, SQL, Python, and web development. She earned her Master of Music in flute performance from the University of Kansas and a bachelor's degree in music with minors in French and mass communication from Southeast Missouri State. Prior to joining the Career Karma team in June 2020, Christina was a teaching assistant, team lead, and section lead at Lambda School, where she led student groups, performed code and project reviews, and debugged problems for students. Christina's technical content is featured frequently in publications like Codecademy, Repl.it, and Educative.","sameAs":["http:\/\/www.linkedin.com\/in\/cmvnk"],"url":"https:\/\/careerkarma.com\/blog\/author\/christina-kopecky\/"}]}},"_links":{"self":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/21344","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/users\/77"}],"replies":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/comments?post=21344"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/21344\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/21345"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=21344"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=21344"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=21344"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}