Title: &quot;Cannot Modify Headers&quot; Error on specific directory URI
Last modified: August 24, 2016

---

# "Cannot Modify Headers" Error on specific directory URI

 *  Resolved [Raps555](https://wordpress.org/support/users/raps555/)
 * (@raps555)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/cannot-modify-headers-error-on-specific-directory-uri/)
 * Hi all, I hope this is the right forum for this. I’m getting a weird “Cannot 
   modify headers” error, and I’ve tried all the usual fixes for it (whitespace,
   BOM, etc), so I figured it was time to ask.
 * At [chriselliottart.com/design](http://chriselliottart.com/design) everything
   works fine. Then, at [chriselliottart.com/design/](http://chriselliottart.com/design/)
   I get the following error:
 * >  Warning: Cannot modify header information – headers already sent by (output
   > started at /home2/chrisel2/public_html/index.php:6) in /home2/chrisel2/public_html/
   > home/wp-includes/pluggable.php on line 1178
 * (I should mention this occurs with all other category and child category pages
   as well, but not with the index)
 * The line in question that the error is happening on is actually IN the header
   of index.php, and is this:
    `<link href='http://fonts.googleapis.com/css?family
   =Raleway:400' rel='stylesheet' type='text/css'>`
 * The weird thing is that no matter how I move the lines of code in the header 
   around, the error always occurs on line 6. I think this has something to do with
   wordpress’s built-in auto-redirect function for URIs it believes to be incorrect(/
   design vs /design/). I think somehow this has run afoul of my other code, but
   I don’t know where to begin looking. The weird thing is that /design is a category
   page, so I’m not sure why the issue is occurring in index. Has anyone else run
   into this issue? I’ll post the entire header where the error occurs below:
 *     ```
       <head>
       <link rel="stylesheet" type="text/css" href="<?php bloginfo('stylesheet_url');?>" media="screen">
       <link href='http://fonts.googleapis.com/css?family=Raleway:400' rel='stylesheet' type='text/css'>
       <script type="text/javascript">var ajaxurl = "http://www.chriselliottart.com/home/wp-admin/admin-ajax.php";</script>
       <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
   
       <title>ChrisElliottArt</title>
       <meta name="description" content="Hello!  My name is Chris. I'm a designer, photographer, and coder based in Philadelphia, and this is my website.">
       </head>
       ```
   
 * Additional info would be that the theme is completely custom and uses an AJAJ
   data request to build the individual posts. This will likely be changing as I’m
   in the process of restructuring the page flow, and likely won’t need that anymore.

Viewing 1 replies (of 1 total)

 *  Thread Starter [Raps555](https://wordpress.org/support/users/raps555/)
 * (@raps555)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/cannot-modify-headers-error-on-specific-directory-uri/#post-5995316)
 * I figured it out, and I thought it would be helpful to post my solution in case
   anyone else runs into this issue:
 * I was looking at the index file in my theme, when I should’ve been looking at
   the index file in the public_html folder. My site operates through the primary
   directory but has its own directory for wordpress to do its business hidden away,
   much like many sites. The issue was that somehow, a <head> tag had ended up in
   the index.php that resides in public_html and tells wordpress how to do its stuff.
   Simply removing that <head> tag fixed the issue.

Viewing 1 replies (of 1 total)

The topic ‘"Cannot Modify Headers" Error on specific directory URI’ is closed to
new replies.

## Tags

 * [cannot](https://wordpress.org/support/topic-tag/cannot/)
 * [header](https://wordpress.org/support/topic-tag/header/)
 * [incorrect](https://wordpress.org/support/topic-tag/incorrect/)
 * [Modify](https://wordpress.org/support/topic-tag/modify/)
 * [redirect](https://wordpress.org/support/topic-tag/redirect/)

 * 1 reply
 * 1 participant
 * Last reply from: [Raps555](https://wordpress.org/support/users/raps555/)
 * Last activity: [11 years, 1 month ago](https://wordpress.org/support/topic/cannot-modify-headers-error-on-specific-directory-uri/#post-5995316)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
