{"id":30120,"date":"2024-11-12T12:39:23","date_gmt":"2024-11-12T12:39:23","guid":{"rendered":"https:\/\/www.seobility.net\/en\/blog\/wiki\/content-type\/"},"modified":"2025-02-26T09:23:49","modified_gmt":"2025-02-26T09:23:49","slug":"Content_Type","status":"publish","type":"wiki","link":"https:\/\/www.seobility.net\/en\/wiki\/Content_Type","title":{"rendered":"Content Type"},"content":{"rendered":"<h2><span class=\"mw-headline\" id=\"Content_type_.E2.80.93_Definition_.26_explanation\">Content type \u2013 Definition &amp; explanation<\/span><\/h2>\n<p>The content-type header is an identifier used to tell the HTTP client or server what the media\/file type of a resource is. Content-type is also called the media type or the MIME (Multipurpose Internet Mail Extensions) type.\n<\/p>\n<p>Specifying the content type helps the user agent understand what type of content it is, improving the <a href=\"\/en\/wiki\/User_Experience\" title=\"User Experience\">user experience<\/a> by displaying content in the best possible fashion.\n<\/p>\n<h2><span class=\"mw-headline\" id=\"Why_is_content_type_used.3F\">Why is content type used?<\/span><\/h2>\n<p>The content-type header indicates the type of media\/file in communication between the HTTP client and the server. It helps the browser or server understand what format the information being sent\/requested is in, improving the way it is processed and displayed.\n<\/p>\n<p>When content type is used in a request by the client, it tells the server what media types it is looking for. Although the server doesn\u2019t have to adhere to the request, it can help it find the right resources and return them in the desired format, if possible.\n<\/p>\n<p>When resources are sent from the server to the client, the content-type header indicates what type of content it is receiving. This helps the browser prioritize resources and know when to render them, potentially improving the <a href=\"\/en\/wiki\/Page_Speed\" title=\"Page Speed\">page speed<\/a>.\n<\/p>\n<p>Even though the file extension provides some information, it doesn\u2019t always offer enough, which is why the content-type header is used.\n<\/p>\n<h2><span class=\"mw-headline\" id=\"Directives\">Directives<\/span><\/h2>\n<p>There are three directives required for the content-type header, namely:\n<\/p>\n<ul>\n<li> Media type \u2013 The resource\u2019s MIME type,<\/li>\n<li> Charset \u2013 The character encoding standard<\/li>\n<li> Boundary \u2013 Only required for multi-part entities. Used to encapsulate the boundaries of the different parts of the message. <\/li>\n<\/ul>\n<h2><span class=\"mw-headline\" id=\"Media_types\">Media types<\/span><\/h2>\n<p>There are a large number of different media types that can be used when setting the content type. Below are some of the most common ones, but a full list can be found on <a rel=\"nofollow\" class=\"external text\" href=\"https:\/\/www.iana.org\/assignments\/media-types\/media-types.xhtml\">Iana.org<\/a>.\n<\/p>\n<ul>\n<li> application\/pdf<\/li>\n<li> application\/xml<\/li>\n<li> audio\/ogg<\/li>\n<li> audio\/mpeg<\/li>\n<li> image\/apng<\/li>\n<li> image\/jpeg (.jpg, .jpeg, .jfif, .pjpeg, .pjp)<\/li>\n<li> text\/css<\/li>\n<li> text\/html<\/li>\n<li> text\/php<\/li>\n<li> text\/xml <\/li>\n<li> video\/mp4<\/li>\n<\/ul>\n<h2><span class=\"mw-headline\" id=\"Browser_compatibility\">Browser compatibility<\/span><\/h2>\n<p>The content-type header is supported by most major browsers, namely:\n<\/p>\n<ul>\n<li> Google Chrome<\/li>\n<li> Mozilla Firefox<\/li>\n<li> Internet Explorer<\/li>\n<li> Safari<\/li>\n<li> Opera<\/li>\n<li> Samsung Internet Browser<\/li>\n<\/ul>\n<h2><span class=\"mw-headline\" id=\"MIME_Sniffing\">MIME Sniffing<\/span><\/h2>\n<p>MIME sniffing is when browsers use the content instead of the content-type header to gauge the MIME type. MIME sniffing means the browser doesn\u2019t follow the content-type header. This can be problematic in some cases, potentially creating a security risk. This can be prevented by using the no-sniff response header.\n<\/p>\n<p>In the past, Google has requested web developers to use the no-sniff response header in a bid to prevent browser hacks <sup id=\"cite_ref-1\" class=\"reference\"><a href=\"#cite_note-1\">&#91;1&#93;<\/a><\/sup>. Not doing so may lead to vulnerabilities that result in a poor user experience.\n<\/p>\n<h2><span class=\"mw-headline\" id=\"Code_syntax_example\">Code syntax example<\/span><\/h2>\n<pre>Content-Type: text\/html; charset=UTF-8\r\nContent-Type: multipart\/form-data; boundary=something<\/pre>\n<h2><span class=\"mw-headline\" id=\"Importance_for_SEO\">Importance for SEO<\/span><\/h2>\n<p>The content-type header isn\u2019t a major part of SEO, but there are some important features that can impact a site\u2019s <a href=\"\/en\/wiki\/Search_Engine\" title=\"Search Engine\">search engine<\/a> performance. By implementing best practices, an improved user experience and website security can be achieved, which, in turn, can help improve your site\u2019s performance in the <a href=\"\/en\/wiki\/SERP\" title=\"SERP\">SERPs<\/a>.\n<\/p>\n<h2><span class=\"mw-headline\" id=\"References\">References<\/span><\/h2>\n<ol class=\"references\">\n<li id=\"cite_note-1\"><span class=\"mw-cite-backlink\"><a href=\"#cite_ref-1\">\u2191<\/a><\/span> <span class=\"reference-text\"><a rel=\"nofollow\" class=\"external text\" href=\"https:\/\/www.searchenginejournal.com\/nosniff-response-headers\/\">Google Asks Publishers to Add Nosniff Response Headers<\/a> Search Engine Journal. Retrieved 02 May 2021.<\/span>\n<\/li>\n<\/ol>\n<h2><span class=\"mw-headline\" id=\"Related_links\">Related links<\/span><\/h2>\n<ul>\n<li> <a rel=\"nofollow\" class=\"external free\" href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Headers\/X-Content-Type-Options\">https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Headers\/X-Content-Type-Options<\/a><\/li>\n<li> <a rel=\"nofollow\" class=\"external free\" href=\"https:\/\/webhint.io\/docs\/user-guide\/hints\/hint-content-type\/\">https:\/\/webhint.io\/docs\/user-guide\/hints\/hint-content-type\/<\/a><\/li>\n<\/ul>\n<h2><span class=\"mw-headline\" id=\"Similar_articles\">Similar articles<\/span><\/h2>\n<ul>\n<li> <a href=\"\/en\/wiki\/HTML_Doctype\" title=\"HTML Doctype\">HTML Doctype<\/a><\/li>\n<li> <a href=\"\/en\/wiki\/User_Experience\" title=\"User Experience\">User Experience<\/a><\/li>\n<\/ul>\n<p><script type=\"application\/ld+json\">\n{\n  \"@context\": \"https:\/\/schema.org\",\n  \"@type\": \"Article\",\n  \"author\": {\n    \"@type\": \"Organization\",\n    \"name\": \"Seobility\",\n    \"url\": \"https:\/\/www.seobility.net\/\"\n  }\n}\n<\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Content type \u2013 Definition &amp; explanation The content-type header is an identifier used to tell the HTTP client or server what the media\/file type of a resource is. Content-type is also called the media type or the MIME (Multipurpose Internet Mail Extensions) type. Specifying the content type helps the user agent understand what type of [&hellip;]<\/p>\n","protected":false},"author":38,"featured_media":0,"comment_status":"open","ping_status":"open","template":"","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"class_list":["post-30120","wiki","type-wiki","status-publish","hentry","wiki_categories-web-development"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>What is the Content-Type Header? - Seobility Wiki<\/title>\n<meta name=\"description\" content=\"The content-type header is an identifier used to tell the HTTP client or server what the media\/file type of a resource is. Learn more\u2026\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.seobility.net\/en\/wiki\/Content_Type\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What is the Content-Type Header? - Seobility Wiki\" \/>\n<meta property=\"og:description\" content=\"The content-type header is an identifier used to tell the HTTP client or server what the media\/file type of a resource is. Learn more\u2026\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.seobility.net\/en\/wiki\/Content_Type\" \/>\n<meta property=\"og:site_name\" content=\"Seobility\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/seobility.net\/\" \/>\n<meta property=\"article:modified_time\" content=\"2025-02-26T09:23:49+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.seobility.net\/wp-content\/uploads\/2025\/06\/seobility-og-image.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@seobility_net\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"ScholarlyArticle\",\"@id\":\"https:\\\/\\\/www.seobility.net\\\/en\\\/wiki\\\/Content_Type#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.seobility.net\\\/en\\\/wiki\\\/Content_Type\"},\"author\":{\"name\":\"Seobility Wiki Team\",\"@id\":\"https:\\\/\\\/www.seobility.net\\\/en\\\/#\\\/schema\\\/person\\\/c838e66a3b46262b4c963df5cd5b2d8a\"},\"headline\":\"Content Type\",\"datePublished\":\"2024-11-12T12:39:23+00:00\",\"dateModified\":\"2025-02-26T09:23:49+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.seobility.net\\\/en\\\/wiki\\\/Content_Type\"},\"wordCount\":543,\"commentCount\":0,\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.seobility.net\\\/en\\\/wiki\\\/Content_Type#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.seobility.net\\\/en\\\/wiki\\\/Content_Type\",\"url\":\"https:\\\/\\\/www.seobility.net\\\/en\\\/wiki\\\/Content_Type\",\"name\":\"What is the Content-Type Header? - Seobility Wiki\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.seobility.net\\\/en\\\/#website\"},\"datePublished\":\"2024-11-12T12:39:23+00:00\",\"dateModified\":\"2025-02-26T09:23:49+00:00\",\"description\":\"The content-type header is an identifier used to tell the HTTP client or server what the media\\\/file type of a resource is. Learn more\u2026\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.seobility.net\\\/en\\\/wiki\\\/Content_Type#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.seobility.net\\\/en\\\/wiki\\\/Content_Type\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.seobility.net\\\/en\\\/wiki\\\/Content_Type#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.seobility.net\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Wiki\",\"item\":\"https:\\\/\\\/www.seobility.net\\\/en\\\/wiki\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Content Type\",\"item\":\"https:\\\/\\\/www.seobility.net\\\/en\\\/wp-json\\\/wp\\\/v2\\\/wiki\\\/30120\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.seobility.net\\\/en\\\/#website\",\"url\":\"https:\\\/\\\/www.seobility.net\\\/en\\\/\",\"name\":\"Seobility\",\"description\":\"Online SEO Software &amp; Tools For Better Rankings\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.seobility.net\\\/en\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.seobility.net\\\/en\\\/#\\\/schema\\\/person\\\/c838e66a3b46262b4c963df5cd5b2d8a\",\"name\":\"Seobility Wiki Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.seobility.net\\\/wp-content\\\/uploads\\\/2025\\\/06\\\/Seobility-S-2025-150x150.png\",\"url\":\"https:\\\/\\\/www.seobility.net\\\/wp-content\\\/uploads\\\/2025\\\/06\\\/Seobility-S-2025-150x150.png\",\"contentUrl\":\"https:\\\/\\\/www.seobility.net\\\/wp-content\\\/uploads\\\/2025\\\/06\\\/Seobility-S-2025-150x150.png\",\"caption\":\"Seobility Wiki Team\"},\"description\":\"The Seobility Wiki team consists of seasoned SEOs, digital marketing professionals, and business experts with combined hands-on experience in SEO, online marketing and web development. All our articles went through a multi-level editorial process to provide you with the best possible quality and truly helpful information. Learn more about the people behind the Seobility Wiki.\",\"url\":\"https:\\\/\\\/www.seobility.net\\\/en\\\/blog\\\/author\\\/seobility-wiki-team\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What is the Content-Type Header? - Seobility Wiki","description":"The content-type header is an identifier used to tell the HTTP client or server what the media\/file type of a resource is. Learn more\u2026","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:\/\/www.seobility.net\/en\/wiki\/Content_Type","og_locale":"en_US","og_type":"article","og_title":"What is the Content-Type Header? - Seobility Wiki","og_description":"The content-type header is an identifier used to tell the HTTP client or server what the media\/file type of a resource is. Learn more\u2026","og_url":"https:\/\/www.seobility.net\/en\/wiki\/Content_Type","og_site_name":"Seobility","article_publisher":"https:\/\/www.facebook.com\/seobility.net\/","article_modified_time":"2025-02-26T09:23:49+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/www.seobility.net\/wp-content\/uploads\/2025\/06\/seobility-og-image.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_site":"@seobility_net","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"ScholarlyArticle","@id":"https:\/\/www.seobility.net\/en\/wiki\/Content_Type#article","isPartOf":{"@id":"https:\/\/www.seobility.net\/en\/wiki\/Content_Type"},"author":{"name":"Seobility Wiki Team","@id":"https:\/\/www.seobility.net\/en\/#\/schema\/person\/c838e66a3b46262b4c963df5cd5b2d8a"},"headline":"Content Type","datePublished":"2024-11-12T12:39:23+00:00","dateModified":"2025-02-26T09:23:49+00:00","mainEntityOfPage":{"@id":"https:\/\/www.seobility.net\/en\/wiki\/Content_Type"},"wordCount":543,"commentCount":0,"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.seobility.net\/en\/wiki\/Content_Type#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.seobility.net\/en\/wiki\/Content_Type","url":"https:\/\/www.seobility.net\/en\/wiki\/Content_Type","name":"What is the Content-Type Header? - Seobility Wiki","isPartOf":{"@id":"https:\/\/www.seobility.net\/en\/#website"},"datePublished":"2024-11-12T12:39:23+00:00","dateModified":"2025-02-26T09:23:49+00:00","description":"The content-type header is an identifier used to tell the HTTP client or server what the media\/file type of a resource is. Learn more\u2026","breadcrumb":{"@id":"https:\/\/www.seobility.net\/en\/wiki\/Content_Type#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.seobility.net\/en\/wiki\/Content_Type"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.seobility.net\/en\/wiki\/Content_Type#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.seobility.net\/en\/"},{"@type":"ListItem","position":2,"name":"Wiki","item":"https:\/\/www.seobility.net\/en\/wiki"},{"@type":"ListItem","position":3,"name":"Content Type","item":"https:\/\/www.seobility.net\/en\/wp-json\/wp\/v2\/wiki\/30120"}]},{"@type":"WebSite","@id":"https:\/\/www.seobility.net\/en\/#website","url":"https:\/\/www.seobility.net\/en\/","name":"Seobility","description":"Online SEO Software &amp; Tools For Better Rankings","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.seobility.net\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.seobility.net\/en\/#\/schema\/person\/c838e66a3b46262b4c963df5cd5b2d8a","name":"Seobility Wiki Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.seobility.net\/wp-content\/uploads\/2025\/06\/Seobility-S-2025-150x150.png","url":"https:\/\/www.seobility.net\/wp-content\/uploads\/2025\/06\/Seobility-S-2025-150x150.png","contentUrl":"https:\/\/www.seobility.net\/wp-content\/uploads\/2025\/06\/Seobility-S-2025-150x150.png","caption":"Seobility Wiki Team"},"description":"The Seobility Wiki team consists of seasoned SEOs, digital marketing professionals, and business experts with combined hands-on experience in SEO, online marketing and web development. All our articles went through a multi-level editorial process to provide you with the best possible quality and truly helpful information. Learn more about the people behind the Seobility Wiki.","url":"https:\/\/www.seobility.net\/en\/blog\/author\/seobility-wiki-team\/"}]}},"_links":{"self":[{"href":"https:\/\/www.seobility.net\/en\/wp-json\/wp\/v2\/wiki\/30120","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.seobility.net\/en\/wp-json\/wp\/v2\/wiki"}],"about":[{"href":"https:\/\/www.seobility.net\/en\/wp-json\/wp\/v2\/types\/wiki"}],"author":[{"embeddable":true,"href":"https:\/\/www.seobility.net\/en\/wp-json\/wp\/v2\/users\/38"}],"replies":[{"embeddable":true,"href":"https:\/\/www.seobility.net\/en\/wp-json\/wp\/v2\/comments?post=30120"}],"version-history":[{"count":0,"href":"https:\/\/www.seobility.net\/en\/wp-json\/wp\/v2\/wiki\/30120\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.seobility.net\/en\/wp-json\/wp\/v2\/media?parent=30120"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}